-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LazyLoad Inline CSS isn't removed on pages generated by AMP plugin #2523
Comments
I tried to replicate this issue with transitional mode on the AMP plugin version 1.5.3, with Storefront and TwentyTwenty themes, and the lazyload inline code is not present on the pages. |
I was able to reproduce the issue on smashingcoding before to submit the issue. But I can't reproduce it anymore... Let's close it, and re-open it if a new case will be detected. |
Hello, we updated official AMP plugin and WP-Rocket plugin on websites that we have amp set up on. Now, if we go and disable this lazy-load option "Enable for iframes and videos", in wp rocket settings https://prnt.sc/sfxs18 , validator error goes away and page is valid, https://prnt.sc/sfxtcy . So, at this moment we can't have lazyloading for iframes and videos enabled on websites that we have amp on. |
I have one customer with the same problem. On his live site, there are two occurrences of: However, the problem doesn't exist on exactly the same page on WP Stagecoach. |
It looks like this is our fault. In most cases, AMP plugin (most likely) is clearing it on its own and changing our However, for some reason, it sometimes might not happen and we have a problem then. That's because we're not filtering We're passing this
|
@Tabrisrp If you can help us here :) |
It was not an issue before, so it's something we didn't add, but now we can 👍 |
Ok, let's filter @Tabrisrp Do you have enough info to be able to make a fix? |
Related ticket: https://secure.helpscout.net/conversation/1173058226/167317/ |
Scope a solution ✅ Estimate the effort ✅ |
Describe the bug
Since 1.50. AMP plugin introduced a new template mode: Transitional
When our LazyLoad is active, the inline CSS related to this feature isn't removed from the AMP page version.
It will cause an error during the AMP validation process
To Reproduce
Steps to reproduce the behavior:
And the
<noscript>
tag which trigger the error during the validation process:<noscript><style id="rocket-lazyload-nojs-css">.rll-youtube-player, [data-lazy-src]{display:none !important;}</style></noscript>
Expected behavior
No inline CSS related to LazyLoad on AMP pages when Transitional mode is selected.
Screenshots
https://d33v4339jhl8k0.cloudfront.net/inline/18928/f09382920cc782ff56d82f2c30d831ea76bae97c/76e2fbb098efe191837410b679ff62852b011295/image-1.png
Additional context
After deactivated the LazyLoad iframe, the
<noscript>
tag which contains a small inline CSS is still present.This code is removed after turning off all LazyLoad options.
Backlog Grooming (for WP Media dev team use only)
The text was updated successfully, but these errors were encountered: