• I have autoptimize enabled and the google pagespeed score has improved significantly. When i activate the js option, the banner doesnt finish loading(on mobile) and the sticky sidebar isnt working. what might have be the cause. please help me fix this.
    this is the link to the page i need help. rostilupt.com

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

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    so when JS optimization is on (and while you make sure to disable al CSS/ JS options in WP Fastest Cache are off, to avoid conflicts), what JS errors are shown on the browser console?

    Thread Starter Theophilus Opoku Bannor

    (@rostilupt)

    After deactivating js/css in wpfc, I see 1 warning and 6 errors in the browser console.

    waring
    (index):1 A cookie associated with a cross-site resource at https://wp.com/ was set without the SameSite attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure.

    errors in the console
    Uncaught ReferenceError: jQuery is not defined
    at (index):88
    (index):101 Uncaught ReferenceError: jQuery is not defined
    at (index):101
    (index):70 Uncaught ReferenceError: jQuery is not defined
    at HTMLDocument.<anonymous> ((index):70)
    (index):210 Uncaught ReferenceError: jQuery is not defined
    at HTMLDocument.<anonymous> ((index):210)
    /wp-content/cache/autoptimize/js/autoptimize_501e8500e588cc0cda5f1f2667743ce7.js:10 Uncaught SyntaxError: Unexpected token ‘<‘
    /wp-content/plugins/jetpack/https:/stats.wp.com/s-202023.js:1 Failed to load resource: the server responded with a status of 404 ()

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    this one is key;

    Uncaught ReferenceError: jQuery is not defined at (index):88

    you’ll make sure jQuery is not asynced (or deferred) either and not pushed to the end of the HTML.

    Thread Starter Theophilus Opoku Bannor

    (@rostilupt)

    Hello, i have excluded the jquery from the assynced/deferred but the same error, Uncaught referenceerror:jquery is not defined at (index):88 is showing.

    the errors has reduced to 4
    1. (index):210 Uncaught TypeError: Cannot read property ‘setDefaults’ of undefined
    at HTMLDocument.<anonymous> ((index):210)
    at i (jquery.js:2)
    at Object.add [as done] (jquery.js:2)
    at n.fn.init.n.fn.ready (jquery.js:2)
    at HTMLDocument.<anonymous> ((index):210)

    2. autoptimize_501e8500e588cc0cda5f1f2667743ce7.js:10 Uncaught SyntaxError: Unexpected token ‘<‘
    3. Uncaught ReferenceError: jQuery is not defined
    at (index):101

    The banners still doesnt finish loading, images not showing on product pages and menu sidebar not responding.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    jQuery is still deferred;

    Thread Starter Theophilus Opoku Bannor

    (@rostilupt)

    Please kindly check jquery is excluded now. the errors remains two but banners still doesnt finish loading, images not showing on product pages and menu sidebar not responding.`

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, getting closer ??

    Can you now add wp-content/uploads/cached-scripts/ to the comma-separated JS optimization exclusion list?

    Thread Starter Theophilus Opoku Bannor

    (@rostilupt)

    Hello frank, i just did that(excluded the wp-content/uploads/cached-scripts/ from the js list. any other suggestion? the problem still exist. kindly check.

    banners still doesnt finish loading, images not showing on product pages and menu sidebar not responding.`

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, guess that leaves us with also excluding wp-includes/js/jquery/ui/, can you do that as well?

    Thread Starter Theophilus Opoku Bannor

    (@rostilupt)

    done with excluding wp-includes/js/jquery/ui/. error still exist.

    banners still doesnt finish loading, images not showing on product pages and menu sidebar not responding.

    Just to let you know, im using flatsome theme.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Autoptimize is off now, so hard to troubleshoot further ??

    Thread Starter Theophilus Opoku Bannor

    (@rostilupt)

    autoptimize is active now

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, so we were at jquery-ui, now you’ll have to exclude that from being asynced (or better yet, disable Async Javascript for now to avoid chasing the wrong rabbit ?? )

    Thread Starter Theophilus Opoku Bannor

    (@rostilupt)

    when in exclude jquery-ui, from asynced, nothing changes.
    But then everything works alright when i disable the asynched plugin and the google pagespeed is baldly affected.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Ahhrrrggg … so the problem is that the excludes in AO weren’t working because as soon as things were excluded they were asynced. Now I understand why I did not understand things all day long ??

    Anyway; sometimes you just cannot optimize things entirely without things breaking. if things do break, you either have to change the broken things or optimize less (in your case by finding just the right files -not- to async).

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘banner does not finish loading and sticky sidebar not working’ is closed to new replies.