Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291721

Strip useless "_" at beginning and end of JS-transliterated machine names

$
0
0

Problem/Motivation

Machine names are created from labels in the UI using JavaScript. There are many places in the Drupal admin UI, where this is used, for example when creating Entity types, blocks or in contrib modules (Rules, Asset Injector, ...).

All unsupported chars in the label are replaced by "_" for the machine name. Quite often, the label may contain characters like brackets at the end. For example if the label is used to add details, like "Node Type A (aka B)" ends up in machine name: node_type_a_aka_b_

Steps to reproduce

See above

Proposed resolution

Having a machine name finishing with "_" is just weird. Remove the trailing "_"

The original creator of the issue provided a patch to fix that.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 291721

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>