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)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bellesmanieres’s picture

Status: Active » Needs review
FileSize
1.33 KB

Patch attached.

Nicolas Bouteille’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Priority: Normal » Major
Issue summary: View changes
Status: Needs review » Needs work

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

El Alemaño’s picture

Nicolas Bouteille’s picture

Status: Needs work » Needs review
El Alemaño’s picture

El Alemaño’s picture

El Alemaño’s picture

joegl’s picture

Does 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!

joegl’s picture

Well I reviewed the patch code and it appears to do exactly what Nicolas recommended. I have implemented it with no issues yet.

davidsickmiller’s picture

Patch #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.

izmeez’s picture

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

mthomas’s picture

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

izmeez’s picture

@mthomas the patch in #12 is much simpler than the one in #10, is the new patch a replacement for the others offered? Thanks.

dbielke1986’s picture

Status: Needs review » Fixed

schould work with version >8.x-1.4

caesius’s picture

Status: Fixed » Needs review

This is for the 7.x version of the module, which has not had any patches for this issue committed.

caesius’s picture

Category: Task » Bug report
Priority: Major » Normal
yorkshire-pudding’s picture

Thanks. I have included the patch at #12 in the Backdrop CMS version of this module.