well, as per the troubleshooting tips in the FAQ; have you tried excluding those scripts from optimization?
Thread Starter
ximin
(@ximin)
hi, thanks for the reply,
yes it is possible to exclude the script and it works,
but is there anyway to make it work without excluding the script?
seems that javascript that does DOM modifications like hiding showing etc will be removed
that depends on the print javascript AND on your AO config actually.
if you can link to a page what has autoptimize + non-excluded print-javascript, I’d be happy to have a look 🙂
but autoptimize isn’t active @ximin, so I can’t see what is going wrong there?
seems printing doesn’t work even if AO JS optimization is off; the resulting page has a logo but no recipe? some JS-errors also on the print-page;
TypeError: document.getElementById(…) is null[Learn More] print-posts-header.js:7:3
ReferenceError: jQuery is not defined[Learn More] print:2:14
ReferenceError: jQuery is not defined[Learn More] print-posts-before-body-end.js:6:2
ReferenceError: pagespeed is not defined[Learn More]
Thread Starter
ximin
(@ximin)
hi, I have removed some of the errors
the other errors are from the ads and pagespeed,
the console shows ‘Uncaught SyntaxError: Unexpected end of input’
for autoptimize, around:
try{document.getElementById(“Recipe_loader”).innerHTML=document.getElementById(“Recipe”).innerHTML
OK, I see you have AO active now, but all seems to work OK, even if the only excluded JS is themes/queenbee_v4/js/print-posts-before-body-end.js?