Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Whether I try to submit a profile2 form, a node/edit form, or otherwise inside the megarow, an http 200 message pops up in an alert() and gets all up in my business! I'm guessing this is a debugging message because it indicates a successful request. From what I recall, this prevents the megarow's action of closing properly after the form submission (if it should? I would need to pull up a commerce kickstart site again to see an example of what the megarow behavior should be), however it's important to note that the form submission works fine.
Comments
Comment #1
Cellar Door CreditAttribution: Cellar Door commentedThis same issue is happening in the Kickstart RC2 as well, same error and same results. Form is saved just not reloaded properly.
Comment #2
vasikethere is the Commerce Kickstart issue related with this one : #1804928: AJAX error 200 when adding new message
Comment #3
rerooting CreditAttribution: rerooting commentedIt's worth noting that:
I get the feeling that this is leftover from debugging?
Is *this* the active issue for this per http://drupal.org/node/1804928#comment-6735350 ?
Comment #4
rerooting CreditAttribution: rerooting commentedLooks like we are re-using this code almost verbatim for two functions in views_megarow.module:
http://drupalcode.org/project/ctools.git/blob?f=includes/modal.inc
So this behavior might be ctools's debugging, and just needs to be switched off somehow? I think I'm in over my head.
Comment #5
bojanz CreditAttribution: bojanz commentedThe "200" message means that the form has issued a redirect instead of rebuilding itself.
In Kickstart it happens when adding a new order message, due to a bug in that code (will be fixed in commerce_message).
There are no active megarow issues around this, if you're seeing the error outside of the Kickstart add message form, you're either not wrapping your form correctly or at all.
Comment #6
rerooting CreditAttribution: rerooting commentedAh ok! So are you indicating that one *must* implement something analagous to :
As is indicated in the documentation, and then as well, for the edit form, something that does a more specific version of this (as you indicate just now):
Possibly is my problem caused by the fact that I am using system urls, such as node/%/edit or user/%/edit in the views ctools dropbutton widget thingy, without implementing special system menu urls with the ajax delivery callback that you suggest? I'll be very embarassed for not trying this if this is the case, and will report back summarily. I have the feeling I will be closing this issue as soon as I implement a system menu path for this, and hanging my head in shame, haha!
Thanks a bunch for following up on this Bojanz! Much appreciate the work you do. You are an exemplary drupal dev and community member!
Comment #8
Rory CreditAttribution: Rory commentedPlease bear with me re-opening this issue, as I may have found a pattern. I tested node edit links in a Views Megarow table and received the AJAX HTTP 200 message dialog, but only on the initial submission of the node edit form.
Each subsequent submission did not but instead added this message to the display queue:
"The content on this page has either been modified by another user, or you have already submitted modifications using this form. As a result, your changes cannot be saved."
I investigated a fix for this message and found one: http://drupal.org/node/394694#comment-5636568. After adding the following code to Views Megarow 7.x-1.0 that fixed the concurrent node editing message:
Now the HTTP 200 message appeared every time. The node was updated fine either way, but it boiled down to choosing whether to have the HTTP 200 dialog... or the concurrent node edit message appear.
It also occurred to me this module may not be protecting against concurrent node editing.
Correct me if I'm wrong, possibly under views_megarow_generic_render()... I'm not sure though, perhaps elsewhere... something could be done here to resolve this issue. The comments from #5 onwards appear to be leaving a solution dangling in the wind, which is somewhat technical.
The evidence I've provided here may at least suggest work is needed on protecting against concurrent node editing.
Comment #9
Rory CreditAttribution: Rory commentedPerhaps this is a related issue with CTools: #1710710: ajax_render should not be used; ajax_deliver should be used instead.
I noticed a comment that suggests Views Megarow expects ajax_deliver to be used.
line 217::views_megarow.module:
Comment #10
Artusamak1/ Views megarow purpose is not to prevent from concurrent editions of the same ressource, if you open the same form in two different tabs and submit one after the other without reloading your page you will end with the same issue. It's not a feature that we are going to cover.
2/ We can't add the validate function in Views megarow due to the fact that's it's related to the action your form is performing, it's the responsability of your form to call the appropriate validate function if required.
3/ I will follow #1710710 to see what should be done here.
I don't see further actions to take from here.