Drupal 7
Jquery Update 1.7
I am able to use Views megarow successfully with Jquery 1.5. But when i upgraded to jquery 1.7 using Jquery update. It stoped working.
I also noticed that when i use a debug statement within the form creation like dpm($node); then it starts working again.
When inspecting the html its observed that the
tag is absent in the ajax populated html. NO ajax events are attached to the save buttons in the quick edit either.
when inspecting the network response i can see that the
tag is indeed being served by the server. Its just that later on during some dom manipulation its getting lost.
Comment | File | Size | Author |
---|---|---|---|
#12 | Incompatibility_with_Jquery1.7_fix-1840368-12.patch | 540 bytes | D34dMan |
#10 | Jquery 1.5.jpg | 112.24 KB | D34dMan |
#10 | Jquery 1.7.jpg | 81.59 KB | D34dMan |
Comments
Comment #1
rerooting CreditAttribution: rerooting commentedInteresting, I'll see what I can add to this ticket. I'll be trying this module out with panopoly/radix theme and bootstrap with jquery 1.8, so I'll see if similar issues arise.
Comment #2
ArtusamakWere you using jQuery 1.7 with the front theme or the admin theme? And if the answer is the admin theme was it seven or something custom?
Comment #3
D34dMan CreditAttribution: D34dMan commentedjQuery 1.7 in a custom Theme.
Comment #4
ArtusamakHmm i just tested with jQuery 1.7.1 & 1.8.1 and it appears that my megarows are open / closed without any issue.
I invite you to have a closer look to your theme.
Which tag are you loosing?
Comment #5
ArtusamakComment #6
rerooting CreditAttribution: rerooting commentedI'm having issues with 1.7 using the Seven theme, specifically with commerce backoffice. Should I report this in commerce backoffice?
Comment #7
bojanz CreditAttribution: bojanz commentedSure. However, since we don't support jquery_update, I can't devote any resources to fixing the problems, you will need to provide a patch.
Comment #8
ArtusamakMoving to Commerce Backoffice.
Need more details now.
Comment #9
D34dMan CreditAttribution: D34dMan commentedi did a hack to conditionally switch to 1.5 on the page that used Views Megarow. As the project got shipped off i didn't bother to have a look at it.
Will set up a test environment and have a look, and if possible provide a patch myself.
I must point out that i had issue in a normal Drupal 7 installation ( without commerce backoffice ). I am not sure if moving this to commerce backoffice is correct. I suggest rerooting should open another issue in Commerce backoffice and paste a link in each issue.
Comment #10
D34dMan CreditAttribution: D34dMan commentedOk here is how i can reproduce the problem by switching Jquery versions from 1.5 to 1.7.
Also note that am able to open the quick edit form. But not able to submit it. The page refreshes without any effect. The reason can be seen in the below two figures. The figures shows the html markup generated for the quick edit form with different versions of jquery.
html output generated with Jquery 1.5
html output generated with Jquery 1.7
As you can see, the
wrapper is not attached to the generated form when using Jquery 1.7, thus the submit actions doesn't work as intended.
EDIT NOTE:
I did a diff for the response served by the server for both case. The only difference was in the form build id. So it safe in assuming that the problem is not in the server side.
Comment #11
D34dMan CreditAttribution: D34dMan commentedI have found out the issue and would submit a patch soon. Its regarding the difference in behaviour of .html() function in Jquery which strips off
tag.
Comment #12
D34dMan CreditAttribution: D34dMan commentedThe provided patch solves the issue for me. Hope somebody else finds it useful.
Comment #13
D34dMan CreditAttribution: D34dMan commented@Artusamak, #4 Did you Try saving the form? Since the wrapping form tag is absent, it will load the input elements, but form cannot be submitted. It will just refresh the page.
Comment #14
muschpusch CreditAttribution: muschpusch commentedpatch looks good and works!
Comment #15
pvhee CreditAttribution: pvhee commentedConfirmed that this is working as well.
Comment #16
ArtusamakGeed catch, i confirm the fix and it works like a charm with Commerce Backoffice. > http://drupalcode.org/project/views_megarow.git/commit/1147148
Thanks for the patch and the review guys.