Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
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
0
This discussion has been closed.
Comments
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?