• 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 8 replies - 16 through 23 (of 23 total)
  • Thread Starter Humiges

    (@humiges)

    Hey @vgstef,
    Hope you are well.
    I got this exact answer…

    “Yes, we’re using this plugin : https://github.com/js-cookie/js-cookie
    I’ve checked it’s the same name”

    Thank you πŸ™‚

    Plugin Author vgstef

    (@vgstef)

    Ok, so probably a conflict of some kind.

    Somewhere in your theme folder, could you open the file js.cookie.js and tell me the version? (you could copy-paste the first lines of that file)

    I’ve updated my plugin to use a noConflict option. You can download the latest version and see if this helps.

    Thread Starter Humiges

    (@humiges)

    Dear @vgstef,
    thank you for your kind update. Unfortunately it didn’t helped. There also isn’t js.cookie.js file, so I requested the information in their forum.
    Will keep you updated πŸ™‚
    Thank you πŸ™‚

    Plugin Author vgstef

    (@vgstef)

    If you look at the source of your page (right click on the page and chose “View source page”), do a search (Ctrl+F) with “js.cookie.js”

    Does your page load this file more than once?
    Could you paste here the lines containing this text?
    If you click on the file, it will open it, what is/are the version next to “JavaScript Cookie” ?

    Thread Starter Humiges

    (@humiges)

    Dear @vgstef,
    thanks again πŸ™‚
    I got the answer to previous question:

    
    >>> Somewhere in your theme folder, could you open the file js.cookie.js and tell me the version?"

    <li>The version is v1.5.0-pre, let us know if you have more questions

    >>> View source page… β€œjs.cookie.js” Does your page load this file more than once?
    <li>No, it's there only once

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

    If I click on the file above:

    /*!
     * JavaScript Cookie v2.1.3
     * https://github.com/js-cookie/js-cookie
     *
     * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
     * Released under the MIT license
     */

    ….

    Thank you πŸ™‚

    Plugin Author vgstef

    (@vgstef)

    Ok, thanks. We’ve got our answer: your theme uses an outdated version of cookie.js
    That old version don’t even support the noConflict option.

    So from my side, there’s nothing I can do. Sorry. You should ask your theme developer to update there libraries, because that could bring conflicts with other plugins too.

    Thread Starter Humiges

    (@humiges)

    Dear @vgstef,
    I can see your answer in my email… but not here.
    I’ll pass your message.
    Thank you so much for your help.
    I’ll keep you updated πŸ™‚

    for those who have same issue.. here is the reply:
    Ok, thanks. We’ve got our answer: your theme uses an outdated version of cookie.js
    That old version don’t even support the noConflict option.

    So from my side, there’s nothing I can do. Sorry. You should ask your theme developer to update there libraries, because that could bring conflicts with other plugins too.

    Plugin Author vgstef

    (@vgstef)

    Did you succeed to fix this issue?
    Where did you put the switcher? In a widget, shortcode, php? Is the switcher available on the page you saw the problem?

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