Ticket #5492 (closed defect: fixed)

Opened 7 months ago

Last modified 6 months ago

Upgrade to jQuery 1.2.x

Reported by: ryan Assigned to: filosofo
Priority: normal Milestone: 2.5
Component: General Version:
Severity: normal Keywords:
Cc:

Attachments

jquery.diff (118.6 kB) - added by ryan on 01/02/08 23:58:17.
ie7_jq122_sortable_fix.diff (0.9 kB) - added by filosofo on 01/05/08 20:20:05.
jquery-1.2.2-final.diff (57.2 kB) - added by filosofo on 01/15/08 13:07:24.

Change History

12/19/07 20:49:13 changed by ryan

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]

12/19/07 20:59:00 changed by filosofo

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?

12/19/07 21:09:16 changed by ryan

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

12/19/07 21:15:16 changed by ryan

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

12/20/07 01:21:16 changed by zamoose

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

12/20/07 15:26:07 changed by filosofo

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

12/21/07 02:40:56 changed by zamoose

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*

12/21/07 02:45:48 changed by filosofo

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

12/21/07 05:43:40 changed by zamoose

Ahhh, excellent.

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

12/21/07 06:09:26 changed by ryan

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

12/22/07 08:40:59 changed by ryan

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/22/07 08:42:10 changed by ryan

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

12/22/07 08:50:37 changed by ryan

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.

01/02/08 23:45:55 changed by filosofo

  • owner changed from anonymous to filosofo.

01/02/08 23:58:17 changed by ryan

  • attachment jquery.diff added.

01/02/08 23:59:22 changed by ryan

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

01/05/08 06:06:16 changed by filosofo

  • status changed from new to closed.
  • resolution set to fixed.

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).

01/05/08 06:14:24 changed by filosofo

  • status changed from closed to reopened.
  • resolution deleted.

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

01/05/08 06:17:23 changed by ryan

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.

01/05/08 06:18:30 changed by ryan

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

01/05/08 14:04:36 changed by alexrabe

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.

01/05/08 20:19:49 changed by filosofo

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.

01/05/08 20:20:05 changed by filosofo

  • attachment ie7_jq122_sortable_fix.diff added.

01/07/08 02:16:29 changed by mdawaffe

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?

01/15/08 13:06:19 changed by filosofo

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

01/15/08 13:07:24 changed by filosofo

  • attachment jquery-1.2.2-final.diff added.

01/15/08 17:05:07 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

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

01/20/08 21:15:21 changed by darkdragon

  • milestone changed from 2.6 to 2.5.