Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#5492 closed defect (bug) (fixed)

Upgrade to jQuery 1.2.x

Reported by: ryan's profile ryan Owned by: filosofo's profile filosofo
Milestone: 2.5 Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Attachments (3)

jquery.diff (118.6 KB) - added by ryan 16 years ago.
ie7_jq122_sortable_fix.diff (909 bytes) - added by filosofo 16 years ago.
jquery-1.2.2-final.diff (57.2 KB) - added by filosofo 16 years ago.

Download all attachments as: .zip

Change History (28)

#1 @ryan
16 years ago

The quick add box for cats disappears with 1.2.1.

[Exception... "'type property can't be changed' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]

#2 @filosofo
16 years ago

jQuery 1.2.2 is in beta but will probably come out this week. Since that's well before WP 2.4, could we test against that instead?

#3 @ryan
16 years ago

That's fine. Either way we need to fix 1.2 compat. Only problem I've seen so far is the cat quick add.

#4 @ryan
16 years ago

$ is not a function
http://localhost/trunk/wp-admin/js/custom-fields.js?ver=20070823
Line 30

#5 @zamoose
16 years ago

#4952 predates this ticket, but since this has the most recent patch associated with it, I'd suggest closing the older one.

#6 @filosofo
16 years ago

Here's the latest beta of jQuery 1.2.2. It sounds like a full release is coming very soon.

#7 @zamoose
16 years ago

Are we still using Prototype for anything in the admin interface? If not, we should just remove the jQuery.noConflict() call at the end of source:trunk/wp-include/js/jquery/jquery.js. That way, jQuery can claim its rightful place as possessor of $() and ryan's bug would go away.

*grin*

#8 @filosofo
16 years ago

no conflict has been fixed in trunk jQuery, which is soon to be v. 1.2.2

#9 @zamoose
16 years ago

Ahhh, excellent.

Still, I thought we were trying to remove all Prototype/Script.aculo.us stuff from the WP admin in favor of jQuery...?

#10 @ryan
16 years ago

We are trying to move everything to jquery, but there are still parts that haven't made it over.

#11 @ryan
16 years ago

With 1.2.2b2, which includes the noConflict fix, we get this:

[Exception... "'type property can't be changed' when calling method: [nsIDOMEventListener::handleEvent]"  nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location: "<unknown>"  data: no]

Line 0

form.post_title has no properties
http://localhost/trunk/wp-includes/js/autosave.js?ver=20070306
Line 6

[Exception... "Component is not available"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: file:///Applications/Firefox.app/Contents/MacOS/components/nsSessionStore.js :: sss_saveState :: line 1749"  data: no]
file:///Applications/Firefox.app/Contents/MacOS/components/nsSessionStore.js
Line 1749

#12 @ryan
16 years ago

  • Summary changed from Upgrade to jQuery 1.2.1 to Upgrade to jQuery 1.2.x

#13 @ryan
16 years ago

Duh, forgot to add back noConflict(). Now errors look like this:

[Exception... "'type property can't be changed' when calling method: [nsIDOMEventListener::handleEvent]"  nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location: "<unknown>"  data: no]

Line 0

[Exception... "Component is not available"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: file:///Applications/Firefox.app/Contents/MacOS/components/nsSessionStore.js :: sss_saveState :: line 1749"  data: no]
file:///Applications/Firefox.app/Contents/MacOS/components/nsSessionStore.js
Line 1749

Autosave and the cat add box are broken.

#14 @filosofo
16 years ago

  • Owner changed from anonymous to filosofo

@ryan
16 years ago

#15 @ryan
16 years ago

FWIW, here's a patch with a build from current jquery svn.

#16 @filosofo
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Everything seems to be fine with nightly jQuery and noConflict.

We can reopen if people are still getting errors.

Please note: the jquery-nightly.js linked to from jQuery's download page doesn't seem to actually be the nightly; you'll have to build your own (or use Ryan's patch).

#17 @filosofo
16 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Oops, I should probably not close the ticket 'til jQuery 1.2.2 is released and added to WP.

#18 @ryan
16 years ago

Looks like the errors are gone now that we ported everything on the write post page to jquery. I'll commit the latest jquery from svn. We can leave the ticket open until 1.2.2 final is released and committed.

#19 @ryan
16 years ago

(In [6561]) jQuery 1.2.2b2. see #5492

#20 @alexrabe
16 years ago

Keep in your mind that jQuery 1.2.x causes problems with Interface 1.2 under IE7. My plugin (NextGEN Gallery) and also the new WordPress widget uses the sortable function from the interface lib. When I tested this with IE7 , the widget will not work proper or crashed. Under FF2 / Safari it's ok so far...

Interface is not longer developed and signed as "deprecated", not sure if jqueryUI is already on the same stage.

#21 @filosofo
16 years ago

I think alexrabe is referring to the problem with IE7 in Interface and jQuery 1.2+ where a sortable becomes un-sortable after being dragged. I've attached a patch that should fix that issue.

#22 @mdawaffe
16 years ago

Widget Sortables patch seems fine (haven't tested, but I'm trusting). I'm annoyed at the need though.

The 1.0 release of jQuery.UI doesn't seem to be compatible with jQuery.noConflict() (which I suggest we keep). Trunk versions of jQuery.UI seem to be broken at the moment. None of their example pages have a working Sortable example (at least in FF).

Does anyone have any experience with jQuery.UI?

#23 @filosofo
16 years ago

jQuery 1.2.2 final has come out, so let's get it into core. Patch attached with no-conflict appended.

http://jquery.com/blog/2008/01/15/jquery-122-2nd-birthday-present/

http://docs.jquery.com/Release:jQuery_1.2.2

#24 @ryan
16 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [6618]) jQuery 1.2.2 final. Props filosofo. fixes #5492

#25 @darkdragon
16 years ago

  • Milestone changed from 2.6 to 2.5
Note: See TracTickets for help on using tickets.