• Hello to the team,
    I’ve been using this plugin for a while now, thanks for that!
    I noticed a console error while visiting my pages and it seems to be linked to easy affiliate links.
    If you go on any page, you will see this in the console:

    Uncaught SyntaxError: Invalid regular expression flags (at autoptimize_single_697c77bb18b5f97b49460656c3b765d3.js:107:124)

    Looking at this line in particular:

    if(this.method==='GET'||this.method==='HEAD'){if(options.cache==='no-store'||options.cache==='no-cache'){var reParamSearch=/([?&])_=[^&]*/if(reParamSearch.test(this.url)){this.url=this.url.replace(reParamSearch,'$1_='+new Date().getTime())}else{var reQueryString=/\?/this.url+=(reQueryString.test(this.url)?'&':'?')+'_='+new Date().getTime()}}}}
    

    I couldn’t find what causing the issue here,
    Thanks for your help
    Michael

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Brecht

    (@brechtvds)

    Hi Michael,

    I don’t immediately see anything pointing to Easy Affiliate Links, or am I missing something? Does the problem go away if you deactivate our plugin?

    From what I can see it’s likely caused by Autoptimize’s JS optimization. That can cause all sorts of issues.

    try adding wp-content/plugins/easy-affiliate-links/ to the comma-separated JS optimization exclusion list, that should help ??

    frank (ao dev)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Uncaught SyntaxError error in Console’ is closed to new replies.