• Resolved mettekrabbe

    (@mettekrabbe)


    Hi,
    There is an error at our webshop, so people can′t put products in the basket :/

    I′ve tried with Chrome and Safari – same error. SCRIPT_DEBUG did not fix it.

    The error is:
    Uncaught TypeError: Cannot read property ‘mozilla’ of undefined
    at HTMLDocument.<anonymous> (wprmenu.js?ver=2017-03-16:97)
    at i (jquery.js?ver=1.12.4-wp:2)
    at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp:2)
    at Function.ready (jquery.js?ver=1.12.4-wp:2)
    at HTMLDocument.J (jquery.js?ver=1.12.4-wp:2)

    Any idea how to fix it?

    Best regards,
    Mette

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter mettekrabbe

    (@mettekrabbe)

    Update:
    I downgraded to WordPress 5.4 and now it works again.

    Best regards,
    Mette

    Is this affecting all Icraft shops? I have not had any orders today and I did upgrade my both my Icraft version and the wordpress version…just wondering!

    In case it helps, I had the same problem with i-amaze and had to edit the javascript for the theme. The file wprmenu.js (inc/responsive-menu/js/wprmenu.js in my case) has a commented out section like so:

    //Additional fixes on change device orientation
    /*
    if( $.browser.mozilla ) {
    	screen.addEventListener("orientationchange", function() {updateOrientation()}); //firefox
    } else if( window.addEventListener ) {
    	window.addEventListener('orientationchange', updateOrientation, false);
    }
    else {
    	window.attachEvent( "orientationchange" );
    }*/

    On the phone through the debugger, Chrome was not treating that as a comment. I changed it to the following:

    //Additional fixes on change device orientation
    /*
    if( if (typeof($.browser) != 'undefined') && $.browser.mozilla ) {
    	screen.addEventListener("orientationchange", function() {updateOrientation()}); //firefox
    } else if( window.addEventListener ) {
    	window.addEventListener('orientationchange', updateOrientation, false);
    }
    else {
    	window.attachEvent( "orientationchange" );
    }*/

    Which should not produce an error if not treated as a comment, but once the change was made, Chrome began treating it as a comment. Go figure… You could also simply delete the section, I suspect.

    Good luck!

    Theme Author marsian

    (@marsian)

    1. Upgrade the theme and all plugins.
    2. Upgrade WordPress
    3. Clean your browser cache so that your browser do not load old files from cache

    You should be fine, If you face any issue open a new support thread, we will try to help fix the issues.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error with JavaScript in webshop’ is closed to new replies.