Problem/Motivation

On Drupal 11.2, the "Add field" form now opens in a modal dialog. The functionality from this module to select a custom field prefix is no longer present in this new interface. This means all new fields are created with the default field_ prefix, and there's no way to select alternatives like schema_.

Steps to reproduce

On a Drupal 11.2 site, install and enable the
schemadotorg_field_prefix
module.
Configure alternative prefixes in the module's settings.
Go to the "Manage fields" page for any entity bundle and click "Add field".
Observe that the modal for adding a new field does not provide an option to select a prefix.

Proposed resolution

It would be ideal to restore the prefix selection functionality. A great user experience would be to allow changing the prefix directly when editing the machine name, as shown in the attached screenshot. When a user clicks the "[Edit]" link next to the machine name, they could be presented with a dropdown for the prefix and a text field for the field name itself.

Thank you for maintaining this extraordinary module.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dan_metille created an issue. See original summary.

jrockowitz’s picture

Priority: Normal » Major

This regression is being caused by #3386762: Use modals in field creation and field edit flow

We are most likely going to have to completely rewrite this module using the similar approach but targeting a completely different form/render array.

jrockowitz’s picture

Status: Active » Needs review

  • jrockowitz committed 70866a9a on 1.0.x
    Issue #3531708: [Drupal 11.2] Field prefix selector is not available in...
jrockowitz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.