Jump to content

jquery error that I think processwire is making


benbyf
 Share

Recommended Posts

Weird. Actually now that I think about it, I assume the error you were getting was in the admin, and not on a front-end page, so it shouldn't matter what version of jquery you set in your front-end templates. Not sure why that module is causing that problem though - it works fine for me.

Link to comment
Share on other sites

It looks like the ProcessPageDelete module uses a jQuery live call, and live() was removed from jQuery. They found a better way to do it, but I still miss the more-straightforward-to-use live() calls. We had to change all of our live() calls to on() calls in the core a version or two back. So I think Nico probably needs to do the same thing in this module. 

Link to comment
Share on other sites

It looks like the ProcessPageDelete module uses a jQuery live call, and live() was removed from jQuery. They found a better way to do it, but I still miss the more-straightforward-to-use live() calls. We had to change all of our live() calls to on() calls in the core a version or two back. So I think Nico probably needs to do the same thing in this module. 

Ryan,

Actually, you still have a couple of "live()" in various places in dev version:

/wire/modules/Inputfield/InputfieldFile/InputfieldFile.js - 3 occurrences (lines: 10, 25, 78,)

/wire/modules/Inputfield/InputfieldImage/InputfieldImage.js -  2 occurrences (lines: 3, 7)

/wire/modules/Inputfield/InputfieldPageAutocomplete/InputfieldPageAutocomplete.js - 3 occurrences (lines: 122, 126, 194)

/wire/modules/Inputfield/InputfieldPageListSelect/InputfieldPageListSelectMultiple.js - 3 occurrences (lines: 27, 30, 78)

Link to comment
Share on other sites

/wire/modules/Inputfield/InputfieldFile/InputfieldFile.js - 3 occurrences (lines: 10, 25, 78,)

/wire/modules/Inputfield/InputfieldImage/InputfieldImage.js -  2 occurrences (lines: 3, 7)

/wire/modules/Inputfield/InputfieldPageAutocomplete/InputfieldPageAutocomplete.js - 3 occurrences (lines: 122, 126, 194)

/wire/modules/Inputfield/InputfieldPageListSelect/InputfieldPageListSelectMultiple.js - 3 occurrences (lines: 27, 30, 78)

Thanks, it looks like I've got a few more updates to make! Actually just checked, and it looks like I've already made them but just not committed them. Though a couple of those are actually just commented out versions of live() that have already been replaced. I keep the old commented version just because I find live() easier to read and comprehend what's going on. :) I'll go ahead and commit the rest here shortly. 

@Ryan...plans to upgrade jQuery to 1.9+?

I'm running jQuery 2.x locally, with the migration plugin. I plan to include the latest 2.x jQuery with PW 2.4. 

fancybox isn't compatible with 1.9.
Don't know if other "plug-ins" are compatible.

I haven't yet found any others, though that might be because I'm still using the migration plugin to identify stuff that needs updating. But I'm not married to the fancybox plugin–we'll replace it with something else. 

  • Like 2
Link to comment
Share on other sites

I haven't yet found any others, though that might be because I'm still using the migration plugin to identify stuff that needs updating. But I'm not married to the fancybox plugin–we'll replace it with something else. 

That's going to be ugly , because there's quite some modules using fancybox and I use it in several project for admin or modules. :)

Link to comment
Share on other sites

What other modules use fancybox? I'm not planning to remove it from the source completely, at least not till 3.0. So if some other module needs to use it, it'll still be there–we can simply add an extra $config->scripts->add('jquery migration plugin') to the top of the JqueryFancybox.module file, and it should continue to work even with the new version of jQuery installed. But ideally I want to switch to a different, more mobile friendly lightbox for our InputfieldImage to use. 

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
 Share

×
×
  • Create New...