Report number in plugin is KZSORZMB
Hi Per,
I don’t see any error on your AMP page. Can you give a screenshot? Also, please try latest dev version. There is an AMP improvement in it.
Hi @hailite , it is in Google Search Console where it says in the AMP validation that for example this is not valid:
<script data-no-optimize=”1″ async>fetch(“https://styrketrappan.se/?litespeed_guest=1″,{method:”POST”,cache:”no-cache”,redirect:”follow”}).then(e=>e.json()).then(e=>{console.log(e),e.hasOwnProperty(“reload”)&&”yes”==e.reload&&window.location.reload(!0)});</script></body></html>
<!– Page generated by LiteSpeed Cache 4.0
Example above is in this page:
https://styrketrappan.se/visuell-webbkarta/?amp
It give the same validation error in 71 pages since 1st of May
I have downloaded 4.1RC5 and asked for a revalidation so i hope that it is good in a couple of days:)
Just got reply from Search Console that the issue is still there, and i use V4.1 RC5
I dug a bit deeper into it and it seem to be described in this page: https://amp.dev/documentation/guides-and-tutorials/learn/validation-workflow/validation_errors/#custom-javascript-is-not-allowed
So, is there anything i can change in the configuration to rectify?
Plugin Support
qtwrk
(@qtwrk)
Hi,
please try add this into your wp-config.php
if (strpos($_SERVER['REQUEST_URI'], "amp") !== false){
define( 'LITESPEED_DISABLE_ALL', true );
}
save and purge all , see how it goes
Best regards,
Thanks @qtwrk, I guess this is a workaround? I added a similar if-thingy for web-stories (the google plugin for stories which is also amp if i understand) and now i can at least start a verification on search console which i couldnt prior to this if-block.
Plugin Support
qtwrk
(@qtwrk)
Hi,
yes , it is supposed to be automatically done by this file https://github.com/litespeedtech/lscache_wp/blob/master/thirdparty/amp.cls.php
but seems it didn’t work out
we will check it out why/what happened though
Best regards,