Jump to content
Search Community

gsap conflicting with Gravity Form wp plugin

MohsenKBZ test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

hey there.

this is my first topic here. so first of all thanks for such a great plugin.

 

here I'm using gravity form plugin. but when I check a checkbox I'm receiving this error

Uncaught TypeError: Cannot read property 'step' of null

 

I will appreciate any help

 

Regards

Mohsen

See the Pen by test (@test) on CodePen

Link to comment
Share on other sites

Hello MohsenKBZ, and Welcome to the GreenSock Forum!

 

Sorry to hear your having issue!

 

I can not see this error in the browser console. Can you please provide some additional information. It will be really hard to debug your website with all your code, with very little info.

 

Your mixing a lot of jQuery methods, a jQuery parallax plugin and other 44 other JS scripts that are or could be setting CSS properties outside of GSAP.. and or conflicting, so we would need more info!

 

We will need to know or see where your GSAP related code is. And to be honest all we really need is the GSAP code your using. Since its Wordpress it could be a number of things wrong, with conflicting scripts, since you have like 44 of them.

  • How do you reproduce this issue?
  • Like what and where the GSAP code is in your site?
  • What line number is this error on?
  • What JS script file is your GSAP code on?
  • Have you tried removing other jQuery plugin to narrow down the problem.

We appreciate additional info!

 

:)

  • Like 2
Link to comment
Share on other sites

Like Jonathan said a reduced demo would be really helpful. 

If you can create a single form, with a single checkbox on a page with nothing else that would be a great start. 

 

I was able to replicate the error when clicking a checkbox. 

 

This is what I saw: EV7OKqZ.png

It seems that jQuery is trying to fire an animation when you click. I have no idea what it is trying to do but you are also loading the jquery.gsap.plugin which automatically hijacks jQuery.animate() animations.

 

My suggestion would be to just remove jquery.gsap.plugin. It appears somewhere along the way something wonky is being passed to that plugin. 

Since all the code is minified I'm really not sure how far we can go with troubleshooting.

  • Like 4
Link to comment
Share on other sites

That is indeed weird and I wonder if there's something odd being hijacked elsewhere because that particular statement that it's throwing an error on is a conditional expression like this:

if (typeof(obj) === "object" && obj.step) { ...

And it's saying obj is null (thus obj.step would throw that error) but that's the whole point of that first part where it checks to see if it's an object so I'm having a tough time understanding how it could possibly even get past that line in the condition unless null has somehow been hijacked to act as if it's an object (never heard of that). Something tells me that there's some other JavaScript that you're loading that's causing some very odd conflict (though I'm not sure because there's so much going on and I don't have time to pull everything apart on that page which is why others are asking for a reduced test case...that'll help a lot). 

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...