-
Notifications
You must be signed in to change notification settings - Fork 224
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
Closes #6137: remove unnecessary exclusions css background images' lazyload #6210
Closes #6137: remove unnecessary exclusions css background images' lazyload #6210
Conversation
This commits removes unnecessary exclusions for CSS background images' lazyload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job.
I don't think that we need to deprecate those public methods as it's not used by any of our helpers (I checked that)
Also just an explanation, in backend we exclude rocket_lazyload_css_data
which is a keyword that is contained inside #rocket_lazyload_css-js-after
script, so we are fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working as expected
testrail-report-532.pdf
Note (problems already on 3.15.2)
1- Images using this markup will be removed from the page => agreed as edge case
<style>.test-new-class{background-image: url("https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/test_internal2.jpg");}.test-new-class{background-image: url("/wp-content/rocket-test-data/images/wp-rocket.svg)");} </style>
Thanks to @vmanthos investigations
The syntax of the following is incorrect:
background-image: url("/wp-content/rocket-test-data/images/wp-rocket.svg)");
There is a ) before " and that results in WP Rocket picking up the whole thing until the last parenthesis.
2- Problem when LL BGI is enabled while WPML is on (under investigation to gather reproducible steps)(happening with CSS absolute URL files)
- Using rocketlabs env, if we have WPML activated on domain base setup, then install /activate WPR, then cache LL BG template, then enable LL BG I then access the sub language FE and hardrefresh => We will have console error for some images
- Console error when trying to switch language in the following steps:
1- WPML is domain base
2- cache the page in both languages
3- WPML changed to a directory
4- access the main language page and click on language switch to sub-lang
if we clear the whole cache then repeat step 4 it will work fine
@Mai-Saad I was able to reproduce the issue on rocketlabsqa.ovh. However, clearing the cache won't fix it. For CSS files processed by the lazyload for background CSS images feature, we set the wrong path, resulting in has an extra The URL should be: https://ar.rocketlabsqa.ovh/wp-content/cache/background-css/ar.rocketlabsqa.ovh/wp-content/cache/min/1/wp-content/rocket-test-data/styles/lazyload_css_background_images.css?ver=1697180904&wpr_t=1697180904 Update I believe this should be on a new GitHub issue. |
Description
We deleted the unnecessary filters for css exclusions for background images' lazyload.
We also deleted linked tests.
Fixes #6137
Type of change
Is the solution different from the one proposed during the grooming?
No
Checklists
Generic development checklist
Test summary