Skip Navigation

[Resolved] Toolset View and Greensock 3.0 Cause Console Log error.

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

Problem: I would like to use the Greensock JS library with Toolset but I keep seeing JavaScript errors when I enqueue the library.

Solution: Add the native WP media element JavaScript as a dependency when enqueueing GSAP JS:

wp_register_script('jrscript',plugins_url('js/gsap.min.js', __FILE__), array('wp-mediaelement'), '', true);
This support ticket is created 5 years 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by benjaminJ-3 5 years ago.

Assisted by: Christian Cox.

Author
Posts
#1387313

I am trying to: Use the Greensock 3 library with toolset view without causing console log errors.

Link to a page where the issue can be seen: hidden link

I expected to see: No console log errors.

Instead, I got: Console log errors.

When both toolset views and greensock 3 (gsap.min.js) are enqueued we get mediaelement console log errors. When on or the other js file is not loaded then there are no errors. There is a conflict between gsap.min.js and toolset views. I'd love to know why this is happening so I can use both together.

#1387351

Hi, let me escalate this to my 2nd tier support team. I was able to reproduce the same error message you experienced after enqueueing the library from their CDN link. Hopefully our team can find a way to make the systems compatible. I'll let you know what I find out.

#1387979

My 2nd tier support team suggests changing the dependencies of this script from jQuery to the wp-mediaelement script like so:

wp_register_script('jrscript',plugins_url('js/gsap.min.js', __FILE__), array('wp-mediaelement'), '', true);

Please enqueue the gsap script with a dependency of wp-mediaelement and let me know if the problem is not completely resolved.

#1390365

My issue is resolved now. Thank you!