Skip Navigation

[Resolved] Cached view is displayed wrong

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user is using an Elementor template inside a view loop. When the view is cached, some styles are lost.

Solution:
When the view is generated and Elementor is building the content for each post of the loop, it generates its custom style and adds it to the page. But when the view is cached, Elementor is not called to render the content of the results and the styles are not added to the page. Check this screenshot for an example http://prntscr.com/stqiwa

This is expected behavior, and to work around it, you will need to copy the styles generated by Elementor to the WordPress customizer, so they will be added when a view is cached.

The user is also using fontawesome, and it is not getting loaded when the view is cached. Its styles need to be added to the theme or the page with custom code.

Relevant Documentation:
https://toolset.com/documentation/user-guides/using-toolset-with-elementor-page-builder/matching-elementor-styling-when-using-toolset/

This support ticket is created 4 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 4 replies, has 2 voices.

Last updated by janS-9 4 years, 11 months ago.

Assisted by: Jamal.

Author
Posts
#1650491

1. Go to Toolset->Views
2. If there is cached version clean cache for 1369 movies — Block Editor
3. Open page hidden link
4. Refresh page - design is broken
5. Go to Toolset -> Views and clean cache for 1369 movies — Block Editor
6. Again refresh page hidden link

How to make Toolset to cache correctly and display given page correctly.

The only way to fix this is to include: "add_filter( 'wpv_filter_disable_caching', '__return_true' );" into functions.php. But if I understand well this will disable caching of all pages.

I think this is bug and should be somehow fixed.

#1650575

Hello and thank you for contacting the Toolset support.

From what I could gather so far, you are using an Elementor template inside the loop of a view block. When the view is generated and Elementor is building the content for each post of the loop, it generates its custom style and adds it to the page. But when the view is cached, Elementor is not called to render the content of the results and the styles are not added to the page. Check this screenshot for an example hidden link

This is expected behavior, and to work around it, you will need to copy the styles generated by Elementor to the WordPress customizer, so they will be added when a view is cached. Check this article:
https://toolset.com/documentation/user-guides/using-toolset-with-elementor-page-builder/matching-elementor-styling-when-using-toolset/

I hope this helps. Let me know if you have any questions.

#1651375

Hi

Mainly this works. I have basically copied css generated for given elementor template. What is not working is that icons are not displayed.

In non-cached version in the top-left part of the image is goggles icon and there is expand/collapse icon missing in the Movie description part. How to get those there?

Thanks

#1651745

The icon is coming from Fontawesome, but the cached version does not enqueue the styles for it. Check this screenshot, it is the missing style from the cached version.
hidden link

I hope this helps a bit. Let me know if you still need assistance with that.

#1654169

My issue is resolved now. Thank you!