#1614 javascript_on set to NULL after updating Display options.

closed-fixed
Options (155)
5
2004-12-27
2004-07-01
Gary
No

Included patch / work around below:

SquirrelMail version: v1.4.3a
WebServer: Apache v1.3.27 + PHP v4.3.2 (RG=off)
OS: Linux i386
Plugins: Lots of them but issue still shows up without
any plugins installed.

Symptoms:

Install a plugin that requires javascript (IE: Spell
Checker or NewMail). Login, click "Options". You should
see the option blocks for the Spell Checker and / or New
Mail at this point... Click "Display Preferences". Does not
matter if you make a change or not, just click
the "Submit" button. Now you are back to the main
Options screen and a note saying "Successfully Saved
Options: Display Preferences".. click the "Refresh Page"
link. After the refresh the you no longer have the Spell
Checker and / or NewMail option blocks listed.

Debugging:

After debugging the issue I found that after you update
your Display Options the var $javascript_on gets set to
NULL instead of 0 or 1. The only way to fix this is to
logout and log back in.

Patch / Workaround:

file: include/options/display.php
------------------------------
Find the function: "save_option_javascript_autodetect
($option)"

Add: $new_javascript_setting = $_POST
['new_javascript_setting'];

after the global line.

Reason: $new_javascript_setting was not getting set.
This most likely is not a problem if RG = on.

====

file: functions/page_header.php
-------------------------------
In the displayHtmlHeader function search for the line:

if ($javascript_on) {

change that to:

if($javascript_on || strpos
($xtra,'new_js_autodetect_results.value')) {

Reason: This allows the javascript auto detect code to
work when you are updating your display options and
your current javascript setting is off/never

Discussion

  • Thijs Kinkhorst

    Thijs Kinkhorst - 2004-11-21
    • assigned_to: nobody --> kink
     
  • Thijs Kinkhorst

    Thijs Kinkhorst - 2004-12-27

    Logged In: YES
    user_id=285765

    Fixed, thanks for reporting!

     
  • Thijs Kinkhorst

    Thijs Kinkhorst - 2004-12-27
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks