GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

New issue
Copy link
New issue
Copy link
In review
Bug
backdrop/backdrop
#5374
backdrop/backdrop#5374
In review
Warnings when removing additional paths from Layout#7247
Bug
backdrop/backdrop
#5374
Copy link
Labels
pr - ready to be committedpr - works for mestatus - has pull request
Milestone
1.35.3

Description

@indigoxela
indigoxela
opened on Nov 27, 2026
Issue body actions

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

  1. Make sure error display's turned on
  2. Pick any layout and add at least one additional path
  3. 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

  1. indigoxela
    added the
    Bug
    issue type on Nov 27, 2026
  2. argiepiano commented on Nov 27, 2026

    @argiepiano
    argiepiano
    on Nov 27, 2026
    More actions

    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

  3. argiepiano
    added
    status - has pull request
    pr - needs testing
    pr - needs code review
    on Nov 27, 2026
  4. argiepiano
    added this to the 1.35.3 milestone on Nov 27, 2026
  5. indigoxela commented on Nov 28, 2026

    @indigoxela
    indigoxela
    on Nov 28, 2026
    MemberAuthor
    More actions

    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.

  6. indigoxela
    added
    pr - ready to be committed
    pr - works for me
    and removed
    pr - needs testing
    pr - needs code review
    on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pr - ready to be committedpr - works for mestatus - has pull request

    Type

    Bug

    Projects

    No projects

      Milestone

      • 1.35.3No due date

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.