The machine name element "id" is defined before the source element "label"

Created on 27 January 2024, 10 months ago
Updated 10 June 2024, 5 months ago

Problem/Motivation

When clicking the 'Add config page' button, I get the following error on 10.2.2 clean installation:

LogicException: The machine name element "id" is defined before the source element "label", it must be defined after or the source element must specify an id. in Drupal\Core\Render\Element\MachineName::processMachineName() (line 191 of /opt/drupal/web/core/lib/Drupal/Core/Render/Element/MachineName.php).

Steps to reproduce

Go to admin/structure/config_pages/types and click 'Add config page'.

Proposed resolution

Needs a patch. I tried to debug it but could not get to the bottom of it.

🐛 Bug report
Status

Closed: works as designed

Version

2.15

Component

Code

Created by

🇷🇴Romania andreic

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @andreic
  • 🇷🇴Romania andreic

    I've set this to Critical because the module is unusable.

  • 🇵🇱Poland shumer Wroclaw

    Hey @andreic,

    I've tried to reproduce the issue by the steps proided in the description and had no luck

    Can you please provide more info? Some trace of the error, or maybe the composer.json file (in that case I can test with your Drupal setup)
    as it might affect on module functionality.

    BR, Alex

  • 🇷🇴Romania andreic

    Never mind. I was doing a ksort() on hook_form_alter() to find the form keys easier. Apparently that doesn't sit well with Form API.
    All fixed.

  • Status changed to Closed: works as designed 5 months ago
  • 🇵🇱Poland shumer Wroclaw
Production build 0.71.5 2024