Max characters on subtype machine name without subtyping

Created on 11 July 2023, over 1 year ago
Updated 14 September 2023, over 1 year ago

Problem/Motivation

There's a limitation on the length machine-readable names for fields, regardless of weather subtyping is enabled, the form automatically fills the machine name with _subtype appended, throwing an error on save. This can be particularly tricky for the user to debug because the error occurs even when the field is hidden because the user didn't enable the subtyping slider.

Steps to reproduce

  • Create a new content type with a long machine name, e.g. computational_tool
  • Assign a schema.org type
  • When pressing "Save", an error shows up saying the machine name is too long
  • Press the "Enable Schema.org subtyping" slider to reveal the invalid field

Proposed resolution

Check wether the machine-readable name generated for the subtype exceeds the allowed length and/or only fill the form textbox when subtyping is enabled.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: won't fix

Version

1.0

Component

User interface

Created by

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

Comments & Activities

  • Issue created by @gpo
  • Status changed to Needs review over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    The machine name max length validation is working as expected. Even though the field may not be visible, I am not sure this needs to be addressed. This also seem like a Form API issue and it should be fixed via Drupal core.

    β†’

  • Status changed to Closed: won't fix over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY
Production build 0.71.5 2024