Machine Name element description should allow for cases where machine name uses hyphens

Created on 3 May 2019, over 5 years ago
Updated 18 February 2023, almost 2 years ago

Problem/Motivation

When adding a new shortcut set, the description on the machine name field uses the machine name element default ("A unique machine-readable name. Can only contain lowercase letters, numbers, and underscores."), but Shortcut machine names require hyphens. The machine name element validator checks the 'replace' key in the form element for '-' vs '_' and changes the validation text accordingly, but the description doesn't change accordingly (see attached screenshot). To reproduce, go to /admin/config/user-interface/shortcut/add-set and click the edit link by machine name after entering a Set name.

Before

After

Proposed resolution

Check for replace key in element in the processMachineName method of the renderer, update description text accordingly.

πŸ› Bug report
Status

Needs work

Version

10.0 ✨

Component
RenderΒ  β†’

Last updated about 8 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States hart0554

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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.

Production build 0.71.5 2024