Title: Settings active tab error (cause problem with other plugins)
Last modified: February 1, 2017

---

# Settings active tab error (cause problem with other plugins)

 *  [xwolfoverride](https://wordpress.org/support/users/xwolfoverride/)
 * (@xwolfoverride)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/settings-active-tab-error-cause-problem-with-other-plugins/)
 * 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 9 years, 3 months ago by [xwolfoverride](https://wordpress.org/support/users/xwolfoverride/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Anonymous User 10765487
 * (@anonymized-10765487)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/settings-active-tab-error-cause-problem-with-other-plugins/#post-8793806)
 * damn, I should have seen that. Thanks for reporting, gonna fix this as soon as
   I can.
 *  Anonymous User 10765487
 * (@anonymized-10765487)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/settings-active-tab-error-cause-problem-with-other-plugins/#post-8794072)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/jm-twitter-cards.svg)
 * [JM Twitter Cards](https://wordpress.org/plugins/jm-twitter-cards/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jm-twitter-cards/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jm-twitter-cards/)
 * [Active Topics](https://wordpress.org/support/plugin/jm-twitter-cards/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jm-twitter-cards/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jm-twitter-cards/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: Anonymous User 10765487
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/settings-active-tab-error-cause-problem-with-other-plugins/#post-8794072)
 * Status: not a support question