OK, let’s start with some questions Nico:
* where do you see the error, in the PHP errorlog or on the browser console?
* what file & line number is identified together with the error?
* from what version were you upgrading to 2.9.5.1?
frank
Thread Starter
wpnh
(@wpnh)
Hi Frank,
i´m seeing this in the browser console.
Uncaught SyntaxError: invalid regular expression flag f
js/autoptimize_single_xxxxxxxx.js
after clicking the error message, this part i marked:
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()}}}}
—————
LINE 107
Plugin Version from 2.7.8 (i guess) to Version 2.9.5.1
Thanks
OK, that JS is not Autoptimize’s, it’s merely being optimized by AO and based on the code snippet it *looks* like it’s WordPress core’s (blocks) wp-includes/js/dist/wp-polyfill-fetch.js which is loaded instead of wp-includes/js/dist/wp-polyfill-fetch.min.js because you’re likely having script debugging on. the best solution would be to disable script debugging, in which case AO will not mess with wp-polyfill-fetch as it will be minified already. alternatively you can untick the “minify excluded CSS/ JS” option.
hope this helps,
frank
No feedback so I assume this got resolved? Feel free to follow up if you still encounter issues!
have a nice day!
frank