Whenever I activate "Load Javascript Deferred" in WP Rocket it breaks the layout of Toolset views. Specifically, a grid layout with various columns becomes one column.
I have followed the instructions on this page: https://toolset.com/faq/how-to-use-optimization-plugins-with-toolset/
None of the exclusions seem to work.
Any ideas?
Hi there
I looked at the settings available with WP Rocket for optimising JavaScript, and I can see that when active you can provide a list of exclusions, which you've done.
However, one of the scripts (frontend.js) isn't enqueued normally, it is added via an inline script in the page head, and I suspect that is the one causing the problem.
You can disable the custom way it is enqueued by adding the following to your wp-config.php:
define( 'TB_SCRIPT_STYLE_LAZY_LOAD', false );
Do you want to try that? It should be enqueued normally in that case, which should make it amenable to including in your list of exceptions for that setting.
Hi Nigel,
Thanks for the idea but unfortunately it didn't seem to make a difference. Any other thoughts?
I see that this is now being added to your page head, but it's with an async attribute whereas the other scripts from Toolset are not.
<script async="" src="<em><u>versteckter Link</u></em>"></script>
Does that need adding to an exclusion list?
I've added that but no change.
Sorry I haven't had a chance to follow up before now.
Did you update Toolset Blocks? The link I shared had version 1.6.6 appended, but I see you are now on version 1.6.8 of Blocks.
I'm not sure how precise the files you added to the WP Rocket settings need to be and what kind of wildcards you can use, but it would be better not to include versions at all, otherwise you'll need to be updating them after every plugin update. (That doesn't just apply to Toolset.)
I also said you would need to add a constant to your wp-config.php, and it doesn't look like you've done that.