Fix machine name field not updating when changed

Created on 9 August 2019, over 5 years ago
Updated 16 October 2023, over 1 year ago

When a field with a machine name is filled out, you can inadvertently change the machine name with no indication that you have changed it.

Steps to reproduce:
- Go to /admin/people/roles/add
- Type "Default" in the Role name field
- Hit the tab key twice
- Type "notdefault"
- Press edit like you were going to change the machine name.

The machine name is now "notdefault," instead of "Default," like it should be. The preview next to the role name field does not update, and continues to say "default." This has been tested on Chrome, Firefox, Firefox Developer Edition, Brave, Opera and Microsoft Edge.

I propose we change the machine name field to have a on_change ajax callback to change the machine name preview field to whatever is in the machine name field. This would allow the user to see what the machine name really is without actually checking the field. Alternatively, we could remove the visually-hidden tag on the machine name field via an ajax callback, to have the effect of pressing edit when someone edits the field on the form.

🐛 Bug report
Status

Closed: outdated

Version

11.0 🔥

Component
Field UI 

Last updated about 2 hours ago

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇺Australia acbramley

    Triaged as part of BSI.

    I cannot reproduce this on 11.x standard profile. 2 tabs after entering a Role name takes you to the Save button.

    The machine name field was changed quite a bit in 10.1 (I believe).

    Closing as outdated based on that.

Production build 0.71.5 2024