• Resolved Ivan Arnaudov

    (@ivanarnaudov)


    Hello,

    I recently noticed that the Slider Revolution (v5.3.0.2) will not launch when Autoptimize option “Force JavaScript in <head>” is checked on one of my websites. The Chrome console reports the following error:

    Uncaught TypeError: Cannot read property 'querySelectorAll' of null
        at mlPushMenu._init (autoptimize_94c381b….js:246)
        at mlPushMenu (autoptimize_94c381b….js:244)
        at HTMLDocument.<anonymous> (autoptimize_94c381b….js:255)
        at i (autoptimize_94c381b….js:3)
        at Object.fireWith [as resolveWith] (autoptimize_94c381b….js:3)
        at Function.ready (autoptimize_94c381b….js:3)
        at HTMLDocument.K (autoptimize_94c381b….js:3)

    I have other WP websites using different themes that also use RevSlider but I cannot reproduce such behavior, so this looks like a site-specific issue. I can live with leaving ‘Force JS in head’ disabled, but if the author is interested in investigating this issue further, I will be happy to help.

    I have left the staging version of the website purposefully broken so that the error message can be studied. The site can be opened via demo [dot] fitmotion [dot] eu (sorry, I don’t want crawlers to pick up a link to a staging site).

    Ivan Arnaudov

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Frank Goossens

    (@futtta)

    this is to be expected, as when “force JS in head” is enabled the DOM isn’t loaded when querySelectorAll fires. you could try to exclude the JS that does the querySelectorAll call (and probably other revslider JS).

    fyi, the current default config of AO (for new installs) is;
    * “force JS in head” disabled -> because JS in head will slow down initial page rendering
    * “aggregate inline JS” disabled -> because inline JS often contains (semi-)unique JS which breaks AO’s cache
    * js/jquery/jquery.js is excluded from optimization -> because inline JS might require jquery to be available early

    hope this clarifies,
    frank

    Thread Starter Ivan Arnaudov

    (@ivanarnaudov)

    Thank you for responding so quickly, Frank!

    I understand the logic of the default settings, but what confused me is that Revslider will still work on a different website, running the very same Autoptimize parameters. I guess I have to assume that it depends on the way the theme developer has integrated Revslider and move on.

    Thank you once again, I admire your work!

    Ivan

    Plugin Author Frank Goossens

    (@futtta)

    I guess I have to assume that it depends on the way the theme developer has integrated Revslider

    it might also have to with revslider version & settings, but indeed ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Revslider will not load when Force JS in head enabled’ is closed to new replies.