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.
Options

Upgrade 1.1.1 & Forum Preferences not sticking

edited March 2007 in Vanilla 1.0 Help
I just upgraded to the latest version (1.1.1) and am now experiencing some issues with setting Forum Preferences within the Account page. Basically, all my checkboxes are set and I cannot change them. If I check or uncheck any preference, it looks like the action has taken place, but when I refresh the page, the checkbox reset to what is was before. Has anyone experienced this issue? Can this be related to a permissions setting? I'm not getting any errors.

Comments

  • Options
    edited March 2007
    yep, it's not working on this forum.

    And the AccesKey option make the page to refresh.
  • Options
    edited March 2007
    the PostBackKey is not sent. Here is respond to the ajax request:
    GET http://lussumo.com/community/ajax/switch.php?Type=ShowBookmarks&Switch=true
    There was a problem authenticating your post information.
  • Options
    edited March 2007
    fix:
    replace lines 90 to 103 84 to 99 of /js/global.js with 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); } } and in /themes/account_preferences_form.php replace line 27 by:<span id="'.$Preference['Name'].'">'.GetDynamicCheckBox($Preference['Name'], $PreferenceDefault, $PrefVal, "SwitchPreference('".$this->Context->Configuration['WEB_ROOT']."ajax/switch.php', '".$Preference['Name']."', ".ForceBool($Preference['RefreshPageAfterSetting'], 0).", '". $this->Context->Session->GetVariable('SessionPostBackKey', 'string')."');", $this->Context->GetDefinition($Preference['LanguageCode'])).'</span>
  • Options
    I made those two changes to the pages indicated, however now I'm getting a JS error

    Error: c50d0cbc6f5c4095f302341765df76ca is not defined
  • Options
    MarkMark Vanilla Staff
    did you not update your js folder? Have you got a cached version of the javascript in your browser?
  • Options
    edited March 2007
    i've got the same problem with vanilla-1.1.1
    dinoboffs fix also doesn't work - it just makes the "saving animation" disappear.
    i don't think it's a cache problem. i tried reloading the page with ctrl-shift-r in firefox, which should do the trick.
  • Options
    edited March 2007
    I just notice I didn't give the good line for the js file.
    In case someone edited the wrong lines, start other from http://lussumo.com/svn/vanilla/trunk/js/global.js
    and patch it again like described there
  • Options
    i'm having (what i think is) the same problem. account.php is crashing. on safari, it won't render for me. when i brought it up in firefox (os x) - it decided it wanted to download and open account.php in dreamweaver. i tried disabling extentions thinking those were to blame, but no improvement.
  • Options
    edited March 2007
    Sorry I forgot some quotes(onclick="SwitchPreference('/Vanilla/ajax/switch.php', 'ShowFormatSelector', 0, 'xxxxxx')), and was testing the fix on the wrong forum.

    In /themes/account_preferences_form.php replace line 27 by:<span id="'.$Preference['Name'].'">'.GetDynamicCheckBox($Preference['Name'], $PreferenceDefault, $PrefVal, "SwitchPreference('".$this->Context->Configuration['WEB_ROOT']."ajax/switch.php', '".$Preference['Name']."', ".ForceBool($Preference['RefreshPageAfterSetting'], 0).", '". $this->Context->Session->GetVariable('SessionPostBackKey', 'string')."');", $this->Context->GetDefinition($Preference['LanguageCode'])).'</span>
  • Options
    edited March 2007
    sorry to bother you again, but still no success.
    Firebug spits out the same error as posted by skube:
    d24267180fa7b6b0dbcfb1126ceb174e is not defined onclick(click clientX=0, clientY=0)
    anything else i should try?

    edit: it took me one minute too long to post...
    it's working fine now. thanks a lot!
  • Options
    Wicked. Works. Thanks Dinoboff.
  • Options
    MarkMark Vanilla Staff
    Okay - I see now. It's patched in the core. I'll be doing a release again soon...
  • Options
    Excellent work, Dinoboff! I noticed it this morning and now there's a solution. Gotta love open source!
  • Options
    Hello, I have just downloaded the vanilla forums and I am receiving an error message when attempting to activate extensions. I have changed the code as described above and still the issue exists. "There is a problem authenticating your post information." I have also cleared the browser cache. What else should I try? Thanks for your help.
  • Options
    edited March 2007
    Your problem is not related to the forum preference one.

    I don't think there is a known bug with the extension page in vanilla 1.1.1.

    You can try to check your cached js/global.js. download http://yourdomain/path/to/vanilla/js/global.js and check that SwitchExtension look like that:function SwitchExtension(AjaxUrl, ExtensionKey, PostBackKey) { var Item = document.getElementById(ExtensionKey); if (Item) Item.className = "Processing"; var Parameters = "ExtensionKey="+ExtensionKey+"&PostBackKey="+PostBackKey; var dm = new DataManager(); dm.Param = ExtensionKey; dm.RequestFailedEvent = SwitchExtensionResult; dm.RequestCompleteEvent = SwitchExtensionResult; // document.location = AjaxUrl+"?"+Parameters; dm.LoadData(AjaxUrl+"?"+Parameters); }
  • Options
    Hey, just wanted to chime in that I saw the same issue with two forums: one upgrade to 1.1.1, one fresh install, and Dinoboff's fix in post #4 fixed it. Thanks!
  • Options
    This is still a NO GO for me. I deleted everything, re-downloaded the application, and re-installed. I am still getting an error when attempting to activate extensions. "There is a problem authenticating your post information." Dinoboff - I tried your fix above however it didn't work. Any more suggestions? Thanks a lot.
  • Options
    MarkMark Vanilla Staff
    Can you grant one of us access to your forum (as an administrator so we can get to the extensions screen)?

    If you give us the url, at least one of us will apply for membership and you can put us in an admin role for testing.
This discussion has been closed.