• Resolved Kevin Bickel

    (@kevin-b)


    I am seeing a JS error that causes other JS on the page to not render.

    Here is the error: Uncaught ReferenceError: o is not defined

    Screenshot with context of the error:

    May be of note: I am using Autoptimize to combine and minify JS

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Senff – a11n

    (@senff)

    Hey @kevin-b

    Autoptimize (and other optimizers/combiners) are sometimes a bit too aggressive when it comes to reducing code, which can result in errors (for example, when a variable from one function is renamed and that new name already exists in another function).

    Do you see any similar errors with the Sticky Block plugin when you don’t have Autoptimize enabled?

    Also, would you mind try and see if replacing the content from /dist/sticky-block.min.js with the contents from this slightly modified file helps?

    • This reply was modified 2 years, 8 months ago by Senff - a11n.
    • This reply was modified 2 years, 8 months ago by Senff - a11n.
    • This reply was modified 2 years, 8 months ago by Senff - a11n.

    pro-tip; you can disable Autoptimize on a per-request basis by adding ?ao_noptimize=1 to the URL.

    if the problem is not there at that point, some autoptimize (re-)configuration might be needed to fix this. there are troubleshooting tips and info on how to exclude in the AO FAQ.

    hope this helps debugging,
    frank (ao dev)

    Thread Starter Kevin Bickel

    (@kevin-b)

    Thank you both for the timely responses!

    @senff I replaced the JS with your modified code. That did get rid of the original error, but two others appeared:

    @optimizingmatters I added that parameter to the URL and that did indeed make the page work properly, so I’ll dive into excluding this file from optimizing.

    Thanks again!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘JS Error’ is closed to new replies.