No additional data sent #6

Open
Luoti opened this Issue Jan 18, 2012 · 4 comments

Comments

Projects
None yet
5 participants
@Luoti

Luoti commented Jan 18, 2012

Hi!

I used this plugin with jquery 1.6.1, but when I upgraded to 1.7.1 the additional form data was not sent. With blind troubleshooting I found out that the additional data was not found in options.data, but it was in the origOptions.data. I fixed it by just adding:

options.data = origOptions.data;

to line 137.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost May 17, 2012

+1 - this fix works for me as well. Perhaps a check for nil on both options.data and origOptions.data is needed?

ghost commented May 17, 2012

+1 - this fix works for me as well. Perhaps a check for nil on both options.data and origOptions.data is needed?

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jun 18, 2012

+1 Great fix, I was looking for it. Should be added to the actual plugin!

ghost commented Jun 18, 2012

+1 Great fix, I was looking for it. Should be added to the actual plugin!

@tony2nite

This comment has been minimized.

Show comment
Hide comment
@tony2nite

tony2nite Oct 27, 2012

+1 Yep, can't add additional options without this

+1 Yep, can't add additional options without this

cmlenz added a commit that referenced this issue Jul 6, 2013

@cmlenz

This comment has been minimized.

Show comment
Hide comment
@cmlenz

cmlenz Jul 6, 2013

Owner

Finally applied :P. Thanks!

Owner

cmlenz commented Jul 6, 2013

Finally applied :P. Thanks!

@cmlenz cmlenz closed this Jul 6, 2013

@swiftyone

This comment has been minimized.

Show comment
Hide comment
@swiftyone

swiftyone Jul 22, 2013

Because of this fix there seems to be a problem with data that is added to the options in a beforeSend callback.
I think the line should be something like:

options.data = $.extend({}, origOptions.data, options.data);

There are still issues, as this does not reflect removing stuff from options.data in the beforeSend callback, but at least it does not ignore additional data which seems to be the more common use case.

Because of this fix there seems to be a problem with data that is added to the options in a beforeSend callback.
I think the line should be something like:

options.data = $.extend({}, origOptions.data, options.data);

There are still issues, as this does not reflect removing stuff from options.data in the beforeSend callback, but at least it does not ignore additional data which seems to be the more common use case.

@cmlenz cmlenz reopened this Jul 26, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment