Closed (fixed)
Project:
Webform
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 May 2010 at 12:17 UTC
Updated:
2 Jul 2010 at 02:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
miro_dietikerAttached patch corrects the issue. I think it doesn't have any side effect.
Comment #2
miro_dietikerswitching fields now that we have found the problem..
Comment #3
kars-t commented[edit]
No I miss read the patch it seems nice!
Comment #4
kars-t commentedI did talk to miro on the IRC about this.
I can confirm that "$form_state['values']['submission']" is not set on submit. Neither for creation nor edit. But I can't confirm that there is a faulty redirect on edit submission either. So sadly "needs work" seems to be currently correct for this issue.
Comment #5
miro_dietikerI've redone the test.
Create a form, add 2 components, add a page break in between.
Add an internal path as redirect target - e.g. "node".
After a submission, redirect happens. Also on submission edit redirect happens here. This is fixed with the patch above.
So i can't reproducewhy it works as expected on your side, Kars-T.
Comment #6
kars-t commentedOkay after an hour of test I figured it out:
If you edit from "node/1/webform-results" you get links in the form of "node/1/submission/1/edit?destination=node%2F1%2Fwebform-results". Of course this will work.
But miro did use the link from the "view" of the result. And that does NOT have a destination! So the redirect will be executed. I than used his patch and you will stay on the result.
Comment #7
quicksketchThis sounds like the same as #216627: Redirect after editing submission, can I mark that one duplicate (since this one has a patch)?
Comment #8
miro_dietikerquicksketch, not really.
the action to finally confirm the editing (and staying on the edit form) was broken due to a wrong check. on editing it is/was finally redirected to the submission target without this patch. that's what we fix.
the other issue suggests changing the behaviour to add another redirect on edit to the target of viewing the submission.
i fully agree this would be a nice solution. but this is instead of fixing the condition, it needs additionally switching the redirect like:
(you need to update the variable names to be correct.)
in other words:
i'm telling you the detection of the edit case doesn't work anymore in 3.x-dev.
he's telling you that we should change the behaviour in right that case.
Comment #9
quicksketchThanks this worked perfectly for me. I shortened up the conditional by using !empty($value), which is the same as isset($value) && $value. Committed to both 3.x branches.