-
AuthorPosts
-
September 19, 2022 at 10:20 am #1365500
Hi
I want to raise the topic of the Cumulative Layout Shift problems on Google Search Console.
In particular the grid layouts. These are causing significant issues with the CLS scores and I am unable to solve the problems.
I spoke with a Google engineer recently (who works in this area) and he said I should reach out to you about this as it’s actually a very big deal at Google right now. I am happy to send you his profile if you want to validate this information.Example of poor CLS: https://pagespeed.web.dev/report?url=https%3A%2F%2Fwww.swarez.co.uk%2Fmodern-art-paintings-for-sale%2Fneon-canyon%2F&hl=en_GB&form_factor=desktop0.375
Example of me changing to a fixed width (zero CLS score): https://pagespeed.web.dev/report?url=https%3A%2F%2Fwww.swarez.co.uk%2Fmodern-art-paintings-for-sale%2Fstella-nubis%2F&hl=en_GB&form_factor=desktop0
A big selection of Portfolio pages can be seen here of you want to test another; https://www.swarez.co.uk/modern-art-paintings-for-sale/Any Page Speed Insights report for the grid-based layouts will show a poor desktop score for CLS. If I abandon the grids completely I get a zero score. If I use grids I get a red score. Can anyone throw light onto this please? And any potential solution?
I have over 400 of these pages and if i have to change the structure of every single one I am going to be in a whole world of pain. I cannot let this continue. Something needs to change.Appreciate your feedback
Thanks
EdSeptember 24, 2022 at 10:41 pm #1366231Hey Swarez,
Thank you for your patience, I have looked at the two page tests that you have linked to, but they both have the same score, on mobile they both have zero
and for desktop they both have 0.12:
I also tested another random page /mirages/ and it tested the same.
On your “fixed” page /stella-nubis/ I see that you are using columns with inage elements, and on the “poor” page /neon-canyon/ you are using a grid. But they are both scoring the same.
On the PageSpeed linked explanation for Cumulative Layout Shift (CLS) it explains how users experience unexpected layout shifts, and the example shows a button moving after an unexpected element is added to the page so the user clicks the wrong button.
But on both of your pages, there is no unexpected layout shift to the human eye. I believe the test shows a false positive, perhaps it is the lazy loading of images or the height of the elements between the DOM load and the final paint of the page, that is, the half of a second before the human eye sees the page.
But I don’t see that abandoning the grids completely will give you a zero score.
When I tested your page on webvitals.dev/cls/ your mobile score was zero, and your desktop score was 0.0051 with the menu causing it:
div#header_main>div.container.av-logo-container>div.inner-container>nav.main_menu>div.avia-menu.av-main-nav-wrap
quite a difference in results compared to PageSpeed, I tried testing my page in PageSpeed but it gave no CLS score because it didn’t have enough data, apparently the test doesn’t give live results. When I tested my page on webvitals.dev/cls with no header I got a zero score, so I guess a drop down menu counts against you, but for a score of 0.0051 it seems fine.Best regards,
MikeSeptember 25, 2022 at 6:06 pm #1366272Hi Mike
Thank you for responding.
I need to draw your attention to a couple of important things.
First – the CLS score for each of the pages I gave you are correct. The results you have highlighted at the top of the Insights page are the site averages, not the actual result for that individual page – hence the word ‘cumulative’ : these are drawn as averages. If you select desktop and scroll down you will see the actual result for that page. Yes, these are live results unless the Google engineer I was speaking to is lying. He is on the dev team for this exact metric.
Each of the failing pages (I have 200 of them) carries a red score for CLS and every single one of them has the grid layouts. Insights gives the top three offending CLS issues and they are all grid related for desktop tests.
So that has to mean that every Enfold user has a potential issue with their grid layouts altering positions of DOM elements on each page they appear on yes?
If you believe that to be a ‘no’ then explain why every page I test on, with grids, carries a 0.337 CLS score under Desktop. I am not making this up Mike – the results are on the screen.
And I understand you supplying results from another testing tools but that is unimportant for Google. It is Insights telling me the grid elements cause layout shifts – end of story.
So this needs to be corrected. Everything else is arbitrary to the issue. You can test with as many other tools as you like but the errors remain. The human eye is irrelevant because Google is not measuring that – it has a benchmark and that has a cut off point – one that Enfold grids are failing on.
If I have cause this then I would love to know. I have never made any code changes to any of the grids. FYI Lazy Loading makes no difference.
I get there are other things that cause issues like menus but that isn’t a priority as it doesn’t have the greatest impact – grids do! it’s there in black and white Mike.
Would appreciate your feedback or if anyone else want’s to weigh in on the issue which I happen to think is extremely important – I have data to prove that since this metric began to fail I have lost 60% of traffic to these pages (cumulative) since Google lowered it’s tolerance level for CLS.
Many thanks
EdSeptember 25, 2022 at 9:24 pm #1366281Hi,
Thank you for your feedback, and thanks for pointing out the CLS score lower on the page that I missed, and I do see that on /neon-canyon/ when tested on PageSpeed you have a score of 0.375, but when I test our grid row demo page for desktop the score is only 0.003:
I also tested our Shop demo page that used grid rows and it had a higher score of 0.022, but still quite lower than yours:
So I compared your /stella-nubis/ page to your /neon-canyon/ page thinking perhaps a different element was causing your high score and I noticed that you didn’t have a video on your “fixed” page so I tested our demo video page, but it’s score was only 0.005:
So while I do see that for your pages, removing the grid row lowers your score, I’m not able to reproduce this with our demo site, or my personnel testing demo site that has no caching or optimization.
Please don’t misunderstand me, I’m not arguing, but in order for me to write an issue report for the Dev Team I need to demonstrate how to reproduce the issue on a clean install with no plugins so they can also reproduce it and investigate.
Perhaps you could enable the Avia Layout Builder Debugger and copy the page shortcode to a plain text file (.txt) and post a DropBox link to it for me to test on my site, that way I could reproduce the issue and investigate further.Thank you for your patience,
MikeSeptember 25, 2022 at 10:55 pm #1366285Hi Mike
Thank you replying.
That is indeed most interesting that you are unable to replicate the issue. That makes me even more curious!
As requested the shortcode link is in the private area for you.
Please do let me know if there’s anything else you need and I will happily provide it.
Thanks in advance
EdSeptember 26, 2022 at 1:27 pm #1366361Hi,
Thank you for the shortcode, I first tested it exactly as you sent it and while the images don’t show for me in the backend the url for the images were in the code and were pulled from your domain on page load and they showed on the frontend, in the first test the CLS was 0.269:
so I was basically able to reproduce the issue, so as a first modification test I changed all of the images to local images to verify the results and rule this out as a cause, I left all settings the same and tried to use the same size images, but the result was a CLS 0.012, a huge difference just by changing the images:
To find a cause for this difference I notice that your images seem to be served by a CDN, please try making a copy of this test page and change the images so they don’t use the CDN or any plugins, and see if you also get a lower score.Best regards,
MikeSeptember 26, 2022 at 9:46 pm #1366458Hi Mike
Thanks for your reply and for testing as you have.The results are curious for sure. Why on earth would serving images from a single point of origin reduce CLS scores like this? It makes no sense to me. Is it the way WP-Rocket is handling image routing or their Lazy Load palceholder coding?
I tested as you asked for and the results match yours – exactly zero for CLS on Desktop. I tested with WP-Rocket and CDN disabled (all the other metrics however, are shot to pieces as a result). That issue aside for now, why would the same image, served from a single location change the way the grids are behaving? What actually is happening here Mike – do you have an understanding of why we see this behaviour? I would love to know.
Your wisdom is required!
All the best
EdSeptember 27, 2022 at 2:03 pm #1366549Hi,
I believe the issue is when you use the CDN images they take longer to load and while the PageSpeed report is checking the page for CLS the images load and change the height of the elements causing the low score.
I tested this css to set the minimum height of the elements that were failing on the CLS report and added it to my WordPress ▸ Customize ▸ Additional CSS because the WordPress CSS field has the highest priority.
I tested this on the original shortcode that you sent me using your image from the CDN that gave the CLS score of 0.269 above (today it gave a score over 0.3xx)@media only screen and (min-width: 768px) { #av-layout-grid-1 .avia-image-container { min-height: 684px; } #av-layout-grid-2 { min-height: 490.75px; } #av-layout-grid-3 { min-height: 189.56px; } #av-layout-grid-4 .flex_cell.av-gridrow-cell.av_one_third { min-height: 490.75px; } }
with this css I got a score of 0.001
I tried to write the css thinking it might be used for all of your pages with the same layout, please try this on your page.
Try to regen your site cache so the css is included before testing, I don’t use any caching on the test site.Best regards,
MikeSeptember 28, 2022 at 1:10 am #1366644Hi Mike
Thank you for the updates.
I have put that CSS you suggested into the Customize location. I have purged all Clouflare assets and re-tested without WP-Rocket on and CLS was zero,I then enabled WP-Rocket and CDN delivery.and tested again – still zero CLS!
I then went through every setting on WP-Rocket and maxed out to my normal configuration then walked away for two hours while it recompiled all CSS, discarded the excess and pre-loaded all cached pages.
Now I’ve come back and tested ten random Portfolio pages (wthe ones with the paintings on in grid format) and we are still zero!!
I don’t want to be a curse here Mike but I think you may have fixed the problem… I noticed my two blue grids on the Homepage were suddenly massive but to be honest, I can live with that. I am now testing other page types including WooCommerce product pages. I am also looking for any layout anomolies across all page types.
I will report back tomorrow if I may so please keep the thread open. But so far every metric is green on Insights.
Back soonest and thank you for all your efforts in helping to resolve this problem. I almost can’t ebeliev it after two years of trying to fix this…
Many thanks
EdSeptember 28, 2022 at 1:38 am #1366645Hi,
Glad to hear, if you find the css causing issues on other pages we could add .single-portfolio to it so it only works on the portfolio pages, like this:@media only screen and (min-width: 768px) { .single-portfolio #av-layout-grid-1 .avia-image-container { min-height: 684px; } .single-portfolio #av-layout-grid-2 { min-height: 490.75px; } .single-portfolio #av-layout-grid-3 { min-height: 189.56px; } .single-portfolio #av-layout-grid-4 .flex_cell.av-gridrow-cell.av_one_third { min-height: 490.75px; } }
Best regards,
MikeSeptember 29, 2022 at 10:44 pm #1367005Thank you so much Mike – this is great and solves the problems.
I am really grateful to you for the time and effort you have put into this grid issue.Thank you again.
Will it be part of any upcoming release? Just curous.
All the best
EdSeptember 30, 2022 at 1:28 am #1367014Hi,
Glad to hear this helped and thank you for bringing this forward, this should also help other users with this issue on their sites.
I don’t see any way that we could include this in the theme because the root of the issue was the use of the CDN and the css above is specific to your pages. Each site/page will have a different element height based on the inner contents.
This worked well for you because all of your pages had the same layout, but unless other users are using a CDN I don’t expect that they will encounter this issue.
But for anyone that does encounter this issue this thread will help explain and offer the means to a solution that we can adjust to suit their situation, if they need help.Unless there is anything else we can assist with on this issue, I would like to close this so the thread stays on topic and is easily found in the search results.
Best regards,
MikeSeptember 30, 2022 at 10:06 am #1367059Of course Mike, no problem and thanks again!
EdSeptember 30, 2022 at 12:18 pm #1367084Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Cumulative Layout Shift (CLS) Grids problem’ is closed to new replies.