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 #3443366: Convert thunder processors to config; fix/add formatter(s) 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.
3)
Open a CE display with "default" view mode for the first time (e.g. admin/structure/types/manage/article/ce-display) and save it. The status of the saved config object is NULL; it should be TRUE.
(Being fixed in #3446296: Allow rendering entity references with custom elements in a different way)
| Comment | File | Size | Author |
|---|---|---|---|
| Screenshot 2024-05-13 at 18.10.26.png | 128.41 KB | roderik |
Issue fork custom_elements-3446953
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
Comment #3
roderikComment #4
roderikComment #5
roderikComment #6
roderikComment #7
roderikComment #8
roderikComment #10
roderikI'm confident enough that the naming in point 2 was actually what was meant.... to merge this myself. Provides a more stable base to work on.
Also included the better solution to point 3, from the #3446296: Allow rendering entity references with custom elements MR.