The cancel button on the new release content_lock-6.x-2.7 does not work.
Click on "Cancel" button refreshes node edit, it does not return to node view.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | cancel_button_.patch-1505022-17.patch | 491 bytes | r_morgan |
The cancel button on the new release content_lock-6.x-2.7 does not work.
Click on "Cancel" button refreshes node edit, it does not return to node view.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | cancel_button_.patch-1505022-17.patch | 491 bytes | r_morgan |
Comments
Comment #1
ohnobinki commentedFixed on 6.x-2.x in 7443ee2, on 7.x-1.x fixed was merged in by f3bfe57. Fix will be in 6.x-2.8 and 7.x-1.3.
This bug was caused by overlooking one place where the security fix patch tried to check for the anti-CSRF token when it shouldn't be. The cancel button is implemented hackily, but through the form_api which is already itself protected against CSRF.
Thanks for the report!
Comment #2
izmeez commentedYes, I wondered if it was related to the new security fixes but thought it best to open a specific issue.
Thanks.
Comment #3
middlenewman commentedAlso doesn't work in 7.x-1.2
Comment #4
ohnobinki commentedComment #6
damonbla commentedI'm currently having this problem with version 7.x-2.0. Clicking the Cancel button just refreshes the node edit page, every time. Did a recent update remove the fix that worked for 7.x-1.2?
Comment #7
lambch commentedSame with me, damonbla.
Comment #8
marcus_clements commented+1
Comment #9
gugalamaciek commented+1
Comment #10
gbirch commented+1 For what it's worth, I'm using a Bootstrap sub-theme, and it appears that some Bootstrap js is being attached to the click event on the cancel button, and not a function from content_lock js.
Comment #11
gugalamaciek commentedStrange thing.
Originally Cancel button is put in $form[actions][cancel]. In that case, #validate parameter looks to be ignored and not fired.
When I moved button directly to $form[cancel], #validate function is fired and in general it works.
Comment #12
izmeez commented@ngwebs Can you provide a patch?
Comment #13
xrayfish commentedIf you rename the button's label, for instance, from 'Cancel' to something else e.g. 'Cancel draft' the form is cancelled and you exit the draft.
For more information on this behaviour refer to - https://www.drupal.org/node/1342066
Comment #16
r_morgan commentedHere is a patch if for the 7.x-2.1 version of this module.
Comment #17
r_morgan commentedMy mistake, the last patch I submitted changes too many of the cancel button entries.
All that needs to happen to get the 7.x-2.1 to work is make a slight change to line 556 of content_lock.module file.
Better/reworked patch attached.
Comment #19
pandaski commented