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.

Comments

Interesting, 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.

Status:Active» Needs work

Were 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?

jQuery 1.7 in a custom Theme.

Hmm 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?

Status:Needs work» Postponed (maintainer needs more info)

I'm having issues with 1.7 using the Seven theme, specifically with commerce backoffice. Should I report this in commerce backoffice?

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

Project:Views Megarow» Commerce Backoffice

Moving to Commerce Backoffice.
Need more details now.

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

StatusFileSize
new81.59 KB
new112.24 KB

Ok 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
Views megarow with jquery 1.5

html output generated with Jquery 1.7
Views megarow 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.

Project:Commerce Backoffice» Views Megarow
Assigned:Unassigned» D34dMan
Status:Postponed (maintainer needs more info)» Needs work

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

Status:Needs work» Needs review
StatusFileSize
new540 bytes

The provided patch solves the issue for me. Hope somebody else finds it useful.

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

Status:Needs review» Reviewed & tested by the community

patch looks good and works!

Confirmed that this is working as well.

Assigned:D34dMan» Unassigned
Status:Reviewed & tested by the community» Fixed

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

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.