• I found a problem in my site with this plugin that makes other plugins to stop working due a javascript error.

    The problem comes in the settings.js when trying to detect the active tab (at the beginning of the file) it reads it from localstorage using key “activetab”:

    activetab = localStorage.getItem("activetab");

    as activetab is a generic name I think it was written in other plugin and read here. Then the value of activetab is not any jquery valid id. Making the line

    if (activetab != '' && $(activetab).length ) {

    to fail and stop javascript execution.

    I set a workaround for that:

    
    ...
            if (typeof(localStorage) != 'undefined' ) {
                activetab = localStorage.getItem("activetab");
            }
    // <XWOLF> test localstorage is jquery valid 
    try{
    $(activetab);
    }catch(e){
    activetab='';
    }
    // </XWOLF>
            if (activetab != '' && $(activetab).length ) {
                $(activetab).fadeIn();
            } else {
    ...
    

    I also recommend to use some prefix for this plugin on the local storage to avoid name collision.

    • This topic was modified 7 years, 10 months ago by xwolfoverride.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Anonymous User 10765487

    (@anonymized-10765487)

    damn, I should have seen that. Thanks for reporting, gonna fix this as soon as I can.

    Anonymous User 10765487

    (@anonymized-10765487)

    thanks should be fixed on 7.8

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Settings active tab error (cause problem with other plugins)’ is closed to new replies.