Problem/Motivation
STR:
- install D8 with Standard profile
- enable content_translation module
- visit admin/config/people/accounts
- submit the form
Expected result: settings are saved
Actual result: form just reloaded, settings aren't saved
What happens:
- content_translation_language_configuration_element_process() adds additional (actually the only one) submit handler to the submit button (code)
- FormBuilder::doBuildForm() checks if there are submit handlers on the submit button, and overrides form submit handlers with the given ones (code)
- FormSubmitter::executeSubmitHandlers() ignores $form['#submit'] handlers if there are handlers in $form_state->getSubmitHandlers() (code)
Proposed resolution
Option 1: Explicitly set submit handler on the submit button in ConfigFormBase::buildForm(). For example, EntityConfirmFormBase::actions() does it in this way.
Option 2: Change behavior of the content_translation module?
Remaining tasks
+ write patch
- decide if tests are required
Comment | File | Size | Author |
---|---|---|---|
#3 | 2534556-3.patch | 4.14 KB | Leksat |
#1 | 2534556-1.patch | 597 bytes | Leksat |
Comments
Comment #1
Leksat CreditAttribution: Leksat at Amazee Labs commentedComment #3
Leksat CreditAttribution: Leksat at Amazee Labs commentedComment #4
Leksat CreditAttribution: Leksat at Amazee Labs commentedThe patch for Option 1 is green.
Comment #5
Gábor HojtsyMakes sense to me. I think this certainly needs tests.
Comment #6
plachI think this a duplicate of #1894596: Account settings cannot be saved anymore if content translation module is installed: can we merge the issues?
Comment #7
Gábor HojtsySorry for not finding that issue. I knew one existed :/ +1 for closing as duplicate and moving there.
Comment #8
Gábor Hojtsy