Problem/Motivation
When adding a new search page at /admin/config/search/pages, the "Label" field is used to auto-fill the machine name. However, if a user changes the label after the initial autofill, the machine name does not update accordingly. This behavior is inconsistent with other places in the core (e.g., content types, menus), where the machine name updates automatically as long as it has not been manually edited.
Steps to reproduce
- Navigate to /admin/config/search/pages.
- Select a page type (Content, Help, or Users) under "Search page type".
- Observe that the "Label" field is autofilled based on the selected page type and the machine name is generated accordingly.
- Change the "Label" field.
- Notice that the machine name does not update to reflect the new label.
- The only way to update the machine name is to click "Edit" next to the machine name field and manually enter it.
Proposed resolution
Update the behavior to ensure that the machine name field continues to sync with the label field, unless the machine name has been manually edited. This would make the experience consistent with other parts of Drupal core.
Remaining tasks
Identify the form and field components responsible for this behavior.
User interface changes
The machine name field under the search page creation will dynamically update when the label is changed (unless manually edited).
Introduced terminology
None.
API changes
None.
Data model changes
None.