Bug Tracker

Opened 11 years ago

Closed 11 years ago

#3920 closed bug (wontfix)

Inconsistency and problem with serializeArray() between jquery.min.js and jquery.pack.js

Reported by: grahamoneale Owned by:
Priority: major Milestone: 1.3.1
Component: ajax Version: 1.3
Keywords: ajax json serialize Cc:
Blocked by: Blocking:

Description

Hi,

Took me a little while to nut down this problem, but it appears there is a difference (probably between how the JQuery JS files are packed/obfuscated?) when calling serializeArray() in JQuery v1.3.

I am sending some ajax data with JSON and using serializeArray(), this works perfectly fine and sends with this post packet using jquery.pack.js:

JQUERY.PACK.JS:

http://localhost:9100/configuration/module-message-type-fields/addnewfield?FromModuleID=2& MessageTypeID=21& ModuleMessageTypeFields.DefaultValue=test3& ModuleMessageTypeFields.Identifier=test1& ModuleMessageTypeFields.IsIdentifierRegEx=false& ModuleMessageTypeFields.MessageTypeFieldFormatID=3& ModuleMessageTypeFields.MessageTypeFieldID=1& ModuleMessageTypeFields.Value=test2& ModuleMessageTypeID=30

Now when I use jquery.min.js, take note that 'MessageTypeFieldFormatID' and 'MessageTypeFieldID' are now missing. These values came from <select> lists, it seems any <select> entries do not serialize, all my <input>'s seem ok though.

JQUERY.MIN.JS:

http://localhost:9100/configuration/module-message-type-fields/addnewfield?FromModuleID=2& MessageTypeID=21& ModuleMessageTypeFields.DefaultValue=test3& ModuleMessageTypeFields.Identifier=test1& ModuleMessageTypeFields.IsIdentifierRegEx=false& ModuleMessageTypeFields.Value=test2& ModuleMessageTypeID=30

Change History (5)

comment:1 Changed 11 years ago by grahamoneale

SORRY - PLEASE NOTE.

Works fine with jquery.min.js and NOT jquery.pack.js.

These should be swapped around.

comment:2 Changed 11 years ago by john

Component: unfilledajax
Milestone: 1.31.3.1

I'm not really sure how to test this - since the URLs that you've provided are local to your application. Do you have a simpler test case somewhere?

comment:3 Changed 11 years ago by dmethvin

jQuery has switched from packer to YUI compressor for the officially supported min version. Are you running packer on jQuery 1.3 yourself?

comment:4 Changed 11 years ago by grahamoneale

I am stating the pack version is not working, the min version works fine. Sorry you had to see my first note to realise this. I was just running the one out of http://jqueryjs.googlecode.com/files/jquery-1.3-release.zip as you guys did not realease a sole jquery-1.3.pack.js.

comment:5 Changed 11 years ago by dmethvin

Resolution: wontfix
Status: newclosed

The jQuery project doesn't release with Packer anymore, we use YUI Compressor. Packer is somewhat picky about syntax, especially the location of semicolons; it's easy to break if Packer isn't tried after every change. That's not very productive work, and since Packer doesn't yield performance improvements (only minor file size improvements) it's not worth the effort.

http://ejohn.org/blog/library-loading-speed/

If you are trying to use Packer on jQuery and can identify specific changes that are needed for it to work properly, please reopen and attach a patch to this ticket.

Note: See TracTickets for help on using tickets.