Fields named other than "field_image" don't trigger states

Created on 7 October 2024, about 2 months ago

Problem/Motivation

I decided to name it "field_media_multiple", as it's a media field and has multiple values.
For some reason I could not change set "controlsTextPrev" or "controlsTextNext" (and many other fields, which I didn't care about)

The issue is the form-states which assume the field name to be "field_image":
':input[name="fields[field_image][settings_edit_form][settings][controls]"]'

Steps to reproduce

1. Create an entity type with a media/image field named other than "field_image"
2. Try to configure the view of that field
3. Check the "Controls" checkbox
4. See no textfields for prev/next come up.

Proposed resolution

Get the actual field name of the current field via the field definition.

Remaining tasks

Fix in code and create MR.

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇩🇪Germany SerkanB

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

Comments & Activities

Production build 0.71.5 2024