Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery3 compatibility #161

Closed
spdawson opened this issue Sep 18, 2016 · 10 comments
Closed

jQuery3 compatibility #161

spdawson opened this issue Sep 18, 2016 · 10 comments

Comments

@spdawson
Copy link

Remotipart is causing a double PATCH request in my app, following upgrade to version 1.3.0. Similar to #129

One PATCH request contains all expected parameters, and has JavaScript format. The other PATCH has HTML format, and does not contain the attachment file parameter.

Furthermore, the spurious PATCH request does not contain the CSRF authenticity token, which is causing my application to terminate the user session as a security precaution.

I observe that if I revert commit 5366076, then the problem goes away. I am using jQuery 3, which appears to have removed the complete method from the jqXHR object.

@thomasstephane
Copy link

Thanks @spdawson I have the same issue and your MR is addressing that well, anything blocking it to be merged in master?

@blackham
Copy link

+1 to the the error:
$.rails.ajax(...).complete is not a function

Quick fix was dropping back to jquery2.

@existent-ltd
Copy link

+1, and dropping back to jQuery2 is not an option for our use case

@fzingg
Copy link

fzingg commented Jan 14, 2017

+1 Double Patch request with JQuery 3

@howells
Copy link

howells commented Feb 1, 2017

+1

2 similar comments
@jaybloke
Copy link

+1

@adis-io
Copy link

adis-io commented Feb 21, 2017

+1

@rodrei
Copy link

rodrei commented Jun 9, 2017

I'm having the same issue here

@penapono
Copy link

+1

@capjuancode
Copy link

capjuancode commented Dec 14, 2017

Same here,

<%= semantic_form_for([blah, blah], remote: true ) do |f| %>

The first Request is Controller#create as JS works but I have the same TypeError:
Uncaught TypeError: $.rails.ajax(...).complete is not a function

Second Request Controller#create as HTML, because I don't have a handler for HTML 💥

and I can't downgrade jQuery3 :( .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants