• Resolved Bob


    I’m having JS error

    Uncaught TypeError: Cannot read property ‘push’ of undefined

    from window._nsl.push

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Laszlo


    Hi @shallway

    The issue seems to be related to JavaScript combine and minification, which messes up the loading order of our codes.
    Currently I see that, the combined and minified file is called in just before the closing </body> tag which is too late, since our inline codes need the function which is in that minified file.

    As I see you are using WP Rocket, so I would suggest excluding our inline codes from the combined JavaScript:

    This will be the code part the you need to exclude:
    (function(a,d){if(a._nsl===d){a._nsl=[];var c=function(){if(a.jQuery===d)setTimeout(c,33);else{for(var b=0;b<a._nsl.length;b++)a._nsl[b].call(a,a.jQuery);a._nsl={push:function(b){b.call(a,a.jQuery)}}}};c()}})(window);

    That will most likely fix the problem.

    Best regards,

    Done that https://www.screencast.com/t/fd0b77HD Problem remains.

    PS. sorry about the post title.

    Plugin Support Laszlo


    Hi @shallway

    Could you try clearing the cache after excluding the mentioned code part?
    Since I can still see our codes in the combined file:

    If the problem would still occur:
    -first of all I would suggest checking if you have an additional caching plugin, to avoid cases when the JS combine would be done by another plugin.
    -if you are sure the only caching plugin you have is WP Rocket, then I would suggest getting in touch with their support staff, probably at:
    telling them that excluding a certain inline code didn’t worked for you.
    Probably there is an extra step that was missed.

    If you have any news on the matter, please inform us!

    Thank you!

    I did clear WPRocket’s cache but problem remain. I have forwarded the issue to WPRocket.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Shawn’ is closed to new replies.