Allow fields that do not start with 'field_' to be included the edit component 'Content' tab

Created on 16 August 2024, 4 months ago

Problem/Motivation

The EditComponentForm only moves fields that begin with 'field_* into the Mercury Editor dialog 'Content' tab.
@see mercury_editor_form_layout_paragraphs_component_form_alter()

Drupal core only supports field names that begin with 'field_*,' but technically, a field can be any name (with a few name conflict exceptions like nid, created, status, etc...). The Schema.org Blueprints module β†’ prefixes Schema.org fields with 'schema_*' and Field Prefix β†’ module allows sites to customize the field prefix or remove the default prefix field_.

Steps to reproduce

Create a field on a Mercury Editor paragraph whose name does not start with 'field_*' using the Schema.org Blueprints module or Field Prefix module.

Proposed resolution

Allow fields that do not start with 'field_' to be included in the edit component 'Content' tab.

Adjust mercury_editor_form_layout_paragraphs_component_form_alter() to move all field definitions (not base field) to the 'Content' tab.

Remaining tasks

  • Create MR
  • Review MR
  • Commit MR

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ› Bug report
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024