AMP not working with LiteSpeed
-
On my website I use LiteSpeed and AMP plugins. The later can’t be used in standard mode where AMP version is served by default, and I’d like it that way. Problem is that LiteSpeed plugins breaks AMP validation. If I turn debug mode on, I receive errors:
‘is_amp_endpoint() was called before the parse_query hook was called’ and
‘is_amp_endpoint() was called before the wp action which means it will not have access to the queried object to determine if it is an AMP response, thus neither the amp_skip_post filter nor the AMP enabled publish metabox toggle will be considered.’
That is the case only if LiteSpeed is turned on. I’ve checked it by disabling plugins one by one – it’s LiteSpeed that causes that, without it it’s fine, AMP works.
Theme is unmodified Twenty Twenty, which works with standard AMP mode.
I’ve searched LiteSpeed files for is_amp_endpoint usage, and found a function which should make sure to disable lazyload on amp. That shouldn’t cause any trouble, but just for test I’ve deleted that line with is_amp_endpoint. And it changed nothig, errors are still there, after cleaning cache on my site and cloudflare. Is there anything I can do to make LiteSpeed work with AMP?The page I need help with: [log in to see the link]
- The topic ‘AMP not working with LiteSpeed’ is closed to new replies.