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

Created on 27 January 2024, 5 months ago
Updated 10 June 2024, 15 days 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 15 days ago
  • πŸ‡΅πŸ‡±Poland shumer Wroclaw
Production build 0.69.0 2024