Support » Plugin: WP User Stylesheet Switcher » Uncaught TypeError: Cookies.getJSON is not a function

  • Hi,
    unfortunately the CSS isn’t switching 🙁

    I checked the problem and I found this error:

    Uncaught TypeError: Cookies.getJSON is not a function
    wp_user_stylesheet_switcher_changeCSS @ wp_user_stylesheet_switcher.js?ver=4.6.1:12
    onchange @ (index):1305

    Any ideas how to fix that please?
    Thank you 🙂

Viewing 15 replies - 1 through 15 (of 23 total)
  • Plugin Author vgstef



    Could you give a URL so I could have a look?
    Which version of the plugin is installed?
    Which browser do you use?

    Dear @vgstef,
    unfortunately, I’m running it on localhost.
    The version is Version v2.1.1
    Thank you very much 🙂

    Plugin Author vgstef


    Which browser are you using?
    Did you disable Javascript?
    Which version of WordPress is installed?
    Are you sure all the files of the plugin are installed?

    Thank you again @vgstef,

    I didn’t disable javascript
    I’m using Chrome and Safari… same result.
    The wordpress is the latest one – currently Version 4.6.1

    You also asked… “Are you sure all the files of the plugin are installed?” i tried to reinstall it and same result 🙁

    Plugin Author vgstef


    Could you check in the source on you html page if the script js.cookie.js is loaded?
    You should find something like:

    <script type='text/javascript' src=''></script>

    <script type=’text/javascript’ src=’/wp-content/plugins/wp-user-stylesheet-switcher/js/js.cookie.js?ver=4.6.1′></script>
    <script type=’text/javascript’ src=’/wp-content/plugins/wp-user-stylesheet-switcher/js/use_cookie_when_ready.js?ver=4.6.1′></script>


    Plugin Author vgstef


    It’s quite hard to find the solution, since I can’t reproduce and can’t see your website.

    Have you tried the plugin on other websites?

    Could you try to disable all other plugins. There could be a plugin that interfere with this one.

    I’m trying to test it with disabling other plugins… I’ll get back to you if I find the problem.
    Thank you vey much for your time @vgstef 🙂

    I tried to disable every plugin and it still doesn’t work 🙁
    Will keep investigate it 🙁
    Thanks a lot

    Update… looks like it’s crashing with my template :((

    • This reply was modified 3 years, 3 months ago by Humiges.
    Plugin Author vgstef


    One other thing you could try.
    Could you change the name of the file js.cookie.js to js_cookie.js
    And in the file wp_user_stylesheet_switcher.php at line 138, update the name of the file js.cookie.js accordingly.

    Plugin Author vgstef


    Is you template available free online so I could try it?

    Thank you again @vgstef
    unfortunately changing the name and the wp_user_stylesheet_switcher.php didn’t help.
    However… I tested to change the Default stylesheet in admin and it worked… so, it’s probably the template, which isn’t available for free 🙁
    I contacted the developers of that theme and if I find the problem, I’ll post it here.
    Thank you very much for trying to help me

    I just wanted to say thank you.
    Unfortunately I didn’t find the what is stopping it from working.
    If I do, I’ll post an update here… If anyone knows answer, please let me know too.

    Plugin Author vgstef


    Hi Humiges,
    Are you able to search for text in all the files of your theme?
    I would like to know if the theme uses a variable called “Cookies”, that could create a conflict with the plugin.

    I’ll find out :))
    Thank you :))

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Uncaught TypeError: Cookies.getJSON is not a function’ is closed to new replies.