fieldNameExists method is inconsistent

Created on 27 March 2025, 16 days ago

Problem/Motivation

The method FieldStorageAddForm::fieldNameExists() method is inconsistent cause it takes care of the field_prefix but doesn't use the field_suffix.

Steps to reproduce

Proposed resolution

Instead of

  // Add the field prefix.
  $field_name = $this->configFactory->get('field_ui.settings')->get('field_prefix') . $value;

we should have

  // Add the field prefix and suffix.
  $field_prefix = $this->configFactory->get('field_ui.settings')->get('field_prefix');
  $field_suffix = $this->configFactory->get('field_ui.settings')->get('field_suffix');
  $field_name = $field_prefix . $value . $field_suffix;

Remaining tasks

  • Code
  • Add tests
  • Review
  • Merge

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.1 🔥

Component

field_ui.module

Created by

🇫🇷France MacSim

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