• Resolved Logman64

    (@logman64)


    This is a staging site so password protected:

    user: hostnexus2
    pass: jw84kYzzFWH3

    Have the strangest issue. This was working fine and now suddenly the main menu doesn’t load. Browser console shows “Uncaught SyntaxError: Invalid regular expression flags”.

    https://wordpress.hostnexus.com/wp-content/cache/autoptimize/js/autoptimize_c872b698c22d4d3d807ab9758ef2b569.js

    Happens when I activate “Optimize JS”. So I loaded the same theme on another test site (just has demo data). Loaded all the same plugins and it works just fine:

    https://wpnex.us/

    I went through all plugins, disabling them and enabling one at a time to try and find conflicts but nothing.

    Saw another similar thread and the user was directed to exclude a JS script. So I have a conflict somewhere, just can’t find it.

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Logman64

    (@logman64)

    Also appears to be only happening with logged out users. Works fine when logged in.

    Plugin Author Frank Goossens

    (@futtta)

    it’s wp-content/plugins/optin-cat-personal-wp/assets/script.js, exclude that and you should be fine 🙂

    have a nice friday!
    frank

    Thread Starter Logman64

    (@logman64)

    Thanks Frank, you are a hero amongst men. 🙂

    Thread Starter Logman64

    (@logman64)

    Marking as resolved!

    Plugin Author Frank Goossens

    (@futtta)

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

    Thread Starter Logman64

    (@logman64)

    Done sir. 🙂

    Thread Starter Logman64

    (@logman64)

    Frank, could you tell me how you identified the JS script causing the issue? I seem to have a similar issue on another site.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    sure;

    1. click on the error to have your browser (I use Firefox) take you to the exact line of the autoptimized JS file where it occurs.
    2. at that line, look for a word (variable name) or string that looks unique
    3. open the same page un-autoptimized (by adding ?ao_noptimize=1 to the URL)
    4. open Firefox’s developer tools and in the debugger use the “search sources” function with the word from (2) to see what source file contains that string
    5. add the file you found that way to the list of AO JS optimization exclusions

    hope this helps! 🙂
    frank

    Thread Starter Logman64

    (@logman64)

    Wow, awesome. Thanks Frank!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Uncaught SyntaxError: Invalid regular expression flags’ is closed to new replies.