Save edit gains control of the standard submit button to allow overriding of the text, etc. But it also overrides the submit callback, which prevent other modules to add theirs.
This eg breaks webform module normal behavour (and several other modules more badly)
Comments
Comment #1
bellesmanieres commentedPatch attached.
Comment #2
nicolas bouteille commentedI have had a look at this patch and it looks like you have removed the code that overrides the submit callback but you have not added it the proper way either.
Here is how I did it for the Block Save and Edit module:
#744378: Prevents other modules to implement hook_form_submit ex: Block Class
hope it helps!
Switching to major IMHO.
Comment #3
El Alemaño commentedComment #4
nicolas bouteille commentedComment #5
El Alemaño commentedComment #6
El Alemaño commentedComment #7
El Alemaño commentedComment #8
joegl commentedDoes the patch fix the issue? I'm very interested in this module and think it would greatly reduce time spent on projects by cutting out on unnecessary clicks. However, I'm concerned about losing other module functionality mentioned in this issue.
Thanks!
Comment #9
joegl commentedWell I reviewed the patch code and it appears to do exactly what Nicolas recommended. I have implemented it with no issues yet.
Comment #10
davidsickmiller commentedPatch #7 effectively causes the "Text to use for default Save button" (save_edit_default_save_button_value) and "Default Save Button Weight" (save_edit_default_save_button_weight) options to be ignored. (They do get applied if "Hide default Save button" is selected, but in that case they don't make any difference.) The code newly moved inside the if block was not indented, so it looks like a mistake.
Here's a new version of #7 without that change (and without an unnecessary whitespace change).
I'm not sure how to test the underlying issue, so don't take this as a positive or negative confirmation of whether the root issue is fixed.
Comment #11
izmeez commentedI'm also not sure how to test this but the patch in comment #10 still applies cleanly to the latest 1.x-dev (2017-11-23) and looking at the patch it appears to be a reasonable fix.
Comment #12
mthomas commentedIn my case I found that there were extra handlers in `$form['actions']['submit']['#submit']` that I needed. The attached patch seemed to fix my issues.
Comment #13
izmeez commented@mthomas the patch in #12 is much simpler than the one in #10, is the new patch a replacement for the others offered? Thanks.
Comment #14
dbielke1986 commentedschould work with version >8.x-1.4
Comment #15
caesius commentedThis is for the 7.x version of the module, which has not had any patches for this issue committed.
Comment #16
caesius commentedComment #17
yorkshire-pudding commentedThanks. I have included the patch at #12 in the Backdrop CMS version of this module.
Comment #18
caesius commentedThe Drupal 7 version of the module is no longer supported.
If you'd like this feature on an LTS Drupal 7 site, consider patching the module with #12.