GeezerVison is showing github.com — Warnings when removing additional paths from Layout · Issue #7247 · backdrop/backdrop-issues
Warnings when removing additional paths from Layout #7247
Description
Description of the bug
Whenever one removes an additional path on admin/structure/layouts/manage/THE_LAYOUT/configure, two warnings are thrown (AJAX):
Warning: Undefined array key "name" in layout_settings_form_update_layout() (Zeile 1340 von .../core/modules/layout/layout.admin.inc).
Warning: Undefined array key "name" in layout_settings_form_update_layout() (Zeile 1341 von .../core/modules/layout/layout.admin.inc).
Steps To Reproduce
- Make sure error display's turned on
- Pick any layout and add at least one additional path
- Click on "Remove" (next to additional path)
Same, if the layout has been saved before, but that's not necessary.
Actual behavior
Warnings show up below the page tabs.
Note: This has no influence on actual functionality.
Expected behavior
No warning,
Additional information
This is a spin-off of #7244, but unrelated there.
- Backdrop CMS version: latest dev
- PHP version: tested and confirmed with 8.5.13, but probably earlier versions, too
Activity
argiepiano commented on Nov 27, 2026
This is caused by the fact that the remove submit button has '#limit_validation_errors' => array(),. A side effect of this is that no values are sent in $form_state['values'] except the button element itself.
The solution is some defensive coding in if ($form_state['values']['name'] !== $layout->name) {}
The bigger question here, however, is why this submit handler is invoked at all when removing an alternative path. The only thing that runs of the whole function here is layout_set_layout_tempstore($layout); at the very end of the handler. All of the other if statements in the handler effectively all return false. But maybe I'm not seeing the reason, so it' best to be safe than sorry. Here's a PR that includes some defensive coding.
backdrop/backdrop#5374
indigoxela commented on Nov 28, 2026
Strange, your PR didn't get a sandbox or dragonbot comment. 🤔 Possibly another temporary problem with Tugboat? Things work properly today... 🤷
Anyway, a small patch to apply locally and I can confirm that defensive coding fixes the problem. 👍
Yes, it seems like layout_settings_form_update_layout() has grown quite a bit, but updating tempstore is still important with all those dynamic subforms and AJAX.
As the code change is really small, I'll set both, WFM and RTBC.
Metadata
Metadata
Development
No branches or pull requestsIssue actions