Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Another follow-up to #2796581: Fields must store their region in entity displays.
Somehow not caught in #2809527: Add backwards compatibility layer for entity display default config that lacks 'region'.
For extra fields that are included in default config, their initial loading will trigger
Undefined index: type in Drupal\field_ui\Form\EntityDisplayFormBase->determineComponentAction() (line 664 of core/modules/field_ui/src/Form/EntityDisplayFormBase.php)
Proposed resolution
There is code to handle extra fields, but does not correctly handle them if it is coming from default config.
Remaining tasks
Write tests
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Comment | File | Size | Author |
---|---|---|---|
#8 | 2811467-extra-fields-8-PASS.patch | 12.47 KB | tim.plunkett |
#8 | 2811467-extra-fields-8-FAIL.patch | 1.91 KB | tim.plunkett |
#7 | interdiff-2811467.txt | 2.23 KB | tim.plunkett |
#7 | 2811467-extra-fields-6.patch | 10.56 KB | tim.plunkett |
#5 | 2811467-extra_fields-4.patch | 8.34 KB | tim.plunkett |
Comments
Comment #2
tim.plunkettComment #4
tim.plunkettComment #5
tim.plunkettComment #7
tim.plunkettComment #8
tim.plunkettAdded a test. The FAIL patch is also the interdiff.
Comment #10
samuel.mortensonLooks good to me. Discussed concerns and questions in IRC.
Comment #11
catchMarking this as duplicate of #2796581: Fields must store their region in entity displays, this shows how fragile the runtime bc layer is, and we discussed a config save-only bc layer in irc which didn't make it back to the original issue before it was committed, but would save doing any of this.