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

Add an option to machine name elements to increment with a delta instead of failing validation

$
0
0

Updated: Comment #0

Problem/Motivation

Machine names are by their nature unique, so they typically have validation to ensure a duplicate machine name does not already exist. However, when the machine name is auto-generated based on another field, the user might sometimes create a duplicate machine name without knowing the machine name field even exists. This causes a usability problem when the user is suddenly confronted with an error on a field they've never seen before.

For example, in the field UI:

  1. Install 8.x standard.
  2. Go to admin/structure/types/manage/page/fields.
  3. Under "Add new field," type "tags" in the Label field and select a term reference field.
  4. You receive a validation error on a field you did not fill in.

Proposed resolution

Make the machine name element provide the option to automatically append a delta.

Remaining tasks

  • Choose an approach.
  • Create patch.
  • Update existing machine names in the block and field UIs to use the auto-delta.
  • Remove the custom delta generation from the views block plugin.

Viewing all articles
Browse latest Browse all 291503

Trending Articles



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