Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 16

6apxatCurtisOdenHotBlackKogalniceanuPantherericgilletteesttc74x00422 +6 guests

Bug? Checkboxes in preferences don't save state

Hello, I think I've found a bug. When I go to the Profile and there to the preferences and click at a checkbox, like "show hidden discussions", the checkbox doesn't save the state. After a reload it has the old state. I've debugged and seen, that the PHP-script ajax/switch.php has an if for a $PostBackKey. When I uncomment it it works. The Ajax-Query from the checkbox doesn't send the PostBackKey... So can I remove the if without any doubts? best regards Franz

Comments

  • Posts: 1,880
    The ajax request send the PostBackKey:function SwitchPreference(AjaxUrl, PreferenceName, RefreshPageWhenComplete, PostBackKey) {
    var Container = document.getElementById(PreferenceName);
    var CheckBox = document.getElementById(PreferenceName+'ID');
    if (CheckBox && Container) {
    Container.className = 'PreferenceProgress';
    var dm = new DataManager();
    dm.Param = PreferenceName;
    dm.RequestFailedEvent = HandleFailure;
    if (RefreshPageWhenComplete == 1) {
    dm.RequestCompleteEvent = RefreshPageWhenAjaxComplete;
    } else {
    dm.RequestCompleteEvent = PreferenceSet;
    }
    dm.LoadData(AjaxUrl+"?Type="+PreferenceName+"&PostBackKey="+PostBackKey+"&Switch="+CheckBox.checked);
    }
    }

    When I change a Bookmark preference in Vanilla 1.1.2 on this forum, the following request is sent:GET http://lussumo.com/community/ajax/switch.php?Type=ShowBookmarks&PostBackKey=xxxxxxxxxxxxxx&Switch=true
    Which version of vanilla are you using?
    Have you tried to clear your browser cache?
  • Posts: 10
    After deleting the cookies it works... (browsercache is deleted automatically, when I close my browser) Now, Ajax sends the PostBackKey... Thank you Dinoboff!
This discussion has been closed.