Missing Elementor CSS pages when using page cache
-
Hi there,
@jamieburchell, it’s been a while π
I’m opening a new topic about this non resolved issue.
Long story short: when using W3TC’s page cache functionnality, after updating Elementor, or deploying a new website version (which wipes out the cache and non-repository saved files, some Elementor pages miss the related CSS, thus look broken. After a couple hours, clearing caches back and forth, things seem to resolve by itself.
Last week, I updated W3TC and Elementor to their latest versions, after not updating the plugins for a too long period. While reading changelogs, I noticed W3 Total Cache, in its latest version, claims adressing caching issues with Elementor. So I though: “Yay, they finally soved it!”. Unfortunately, the results is even worse than before. Now, after deploying, when using page cache, ALL my Elementor pages are broken.
I tried one earlier W3TC version: same results.
So I went for further testings, again (interesting since I now have a more consistent behavior), and found this:
- Right after a deployment (everything is purged), all my Elementor pages are broken.
- If, a few seconds after loading a broken page, I “Purge all caches” (W3TC) and then reload a page I just attempted to display, then it renders correctly (A page I didn’t just attempt to render will be brocken though).
- However, if I also purge the Elementor CSS, the same page is broken again.
- I checked by switching to Elementor CSS file mode (instead of inline): the CSS is generated quite quickly as well, visible in the /uploads/elementor/css/ folder, with the expected content. The problem is that this files seems to be always created just too late (not SO late but still too late), right after the page’s HTML is cached, so with the missing inline CSS, or no CSS filepath declaration, since it’s probably not provided if the file is not yet generated; thus after the HTML page cache is saved, again.
I did them back and forth: my tests are now consistent. So I’m quite confident this explanation makes sense.
One solution could be to use the Elementor CSS file method + keeping the content of the uploads/elementor/css/* folder when deploying. So that the files are still ready to serve.
Unfortuntately, this won’t be sufficient, for 2 reasons:
- Elementor wipes out the CSS during each Elementor update. Considering Elementor’s high update frequency, we can assume we’ll still often face the issue…
- There’s a chance Elementor needs to regenerate the CSS files after the update, so that the maintained files might be outdated, or break the pages.
So… The real solution, would be leveraging an Elementor signal which would tell: “Hey Cache plugin! It took a bit, but my CSS is now ready >> you can now render the page and cache it!).
Considering you W3TC and Elementor both count amongst the most used WordPress plugins, is there a chance you guys team up to build such a process? So that we can take advantage of a powerful pagebuilder + a lightening fast cache plugin ?
Thanks
You must be logged in to reply to this topic.