Skip Navigation

[Resolved] JavaScript error when using SG Optimizer to combine JS files

This support ticket is created 3 years, 8 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by JorgeE7101 3 years, 8 months ago.

Assisted by: Nigel.

Author
Posts
#1748805

Hello.

After updating Views today to version version 3.2.2, I've noticed that most of the resources of the site weren't loading.

I found out that Views is now colliding with SG Optimizer — which is vital to speed up the website. If the following option is enabled, the site's functionality breaks completely:

"Combine JavaScript Files - Combine your JavaScript files in order to reduce the number of requests to the server."

This wasn't happening with the previous version of Views.

Could someone please help me with this. Is there any other solution other than exclude the scripts?

Thanks.

#1753203

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi there

The following page lists JS files which must be excluded by optimisation plugins that combine JS files (they don't necessarily combine them in the expected order, which can cause things to break):

https://toolset.com/faq/how-to-use-optimization-plugins-with-toolset/

Have you excluded those files? (This is not a new requirement.)

If you find after excluding those particular files that you still experience problems, let me know (it could be that an update has added JS files which would also need to be excluded).

#1753573
Screenshot 2020-08-24 at 12.35.09.png

Hi Nigel,

Thanks for your reply. I'm using SG Optimiser and I was using it before the Views update without any exclusions and it was working fine. It was just when I updated Views that this happening.

I've checked and there is no way to insert those files on that list, because they show up on the list of files to exclude.

I've got about 4 listed as Toolset and about the same from the Theme and the jquery one. That's it.

Any clues?

Thanks.

#1753703

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

It could be that the new version of Views relies on some additional JS files that cannot be combined by optimiser plugins, or that the way you were using Views before didn't depend on the problematic files.

I tried to check how to add files to SiteGround to exclude them, but I can't test the plugin when not using SiteGround as host, the plugin won't activate in other environments.

If it's not possible to specify individual files to exclude from the JS concatenation then you may have to turn this feature off, and use another plugin which does allow you to list files to exclude from the optimisation. (I'd guess that https://wordpress.org/plugins/autoptimize/ is the most popular such plugin.)

#1753825

Hi Nigel,

No problem. I'll try another plugin.

Thank you.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.