Fix UI/config bugs in field_* and extra-fields

Created on 13 May 2024, about 1 month ago
Updated 28 May 2024, 19 days ago

2 bugfixes in 3 commits. 1 and 2 must be in the same MR to prevent merge conflicts; 3 was quick enough that I'm just including it here.

1)

I've made a mistake in https://git.drupalcode.org/project/custom_elements/-/merge_requests/58/d... (First quick MR from πŸ“Œ Convert thunder processors to config; fix/add formatter(s) Needs work that was committed right before 3.0-alpha1):

EntityCeDisplay:: init() now calls parent::init(), whereas it did not before.

Now the 'extra fields' are added to array $ce_display->content or array $ce_display->hidden. So, they could show up among the 'enabled' rows in the UI (on e.g. admin/structure/types/manage/article/ce-display, the "Links" are enabled.)

(There's another bug that still makes the extra-fields show up in the 'Disabled' section; that's a separate edit-form bug which I'm not fixing here.)

2)

a. For a new (not yet saved) CE display that contain fields with names "field_NAME", their 'Key' (name used by the processor) shows as "field_NAME". See screenshot.

b. When loading an already existing CE display, these fields always (wrongly) show as "disabled".

The second point is because our code assumes that the saved field name is "NAME" (when it is in fact "field_NAME"). My assumption is that actually. we want the field name to be "field_NAME" -- but we want the 'Key' to show as "NAME".

Issue 2a and 2b are fixed in separate pieces of code.

(Being fixed in πŸ“Œ Allow rendering entity references with custom elements Active in a different way)

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands roderik Amsterdam,NL / Budapest,HU

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024