Support » Plugin: Autoptimize » Couple errors in the browser console when trying to preview a post

  • Resolved aramevent

    (@aramevent)


    Hello,

    I installed Autoptimized couple of days ago to speed up my site and it started to perform a lot faster. Unfortunately I also started to have a strange issue with post preview. Ones I would preview new post the whole site would stall and stop loading with the wheel spinning continuously. Happened in Safari and Chrome browsers. I had to close the browser and open it again. So I contacted my host provider and they replied with following:

    I see a couple errors in the browser console when trying to preview a post

    Uncaught ReferenceError: jQuery is not defined
    at ?preview_id=11750&preview_nonce=957781b081&post_format=standard&_thumbnail_id=3750&preview=true:1822

    and

    Uncaught SyntaxError: Unexpected end of input

    In addition when measuring speed in PageSpeed Insight I started to receive an error too

    “An error has occurred
    Lighthouse returned error: FAILED_DOCUMENT_REQUEST. Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Details: net::ERR_ACCESS_DENIED) You may refresh to try again.”

    I had to disable AO but I would really like to find a workaround the issue.

    Please let me know if you can help. Thank you!

    Aram-

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

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

    (@optimizingmatters)

    for the preview-issue; try (re-)adding js/jquery/jquery.js to the comma-separated list of js optimization exclusions.

    for the lighthouse issue: looks like something might be blocking css/js files (for certain bots) from wp-content/cache but that’s not something AO would do .. does the site work for normal visitors?

    Unfortunately adding js/jquery/jquery.js to the comma-separated list of js optimization exclusions didn’t change a thing.

    Any thoughts?

    Site work normal for visitors

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    in that case my best guess is you have something else (a plugin) doing something to jquery (asynicng or deferring maybe), see if that is the case and undo that?

    specifically for autoptimize you can always untick the “also optimize for logged on users”-option, that makes sure AO is not active in e.g. the preview mode.

    hope this helps,
    frank

    Untick the “also optimize for logged on users” option worked for me.
    Thank you!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome, feel free to leave a review of the plugin and support here! 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Couple errors in the browser console when trying to preview a post’ is closed to new replies.