Problem/Motivation
We had two bugs in a project, a fatal error on a behavior because \Drupal\paragraphs\ParagraphsBehaviorBase::getFieldNameOptions() returned a base field and the summary showing the username despite that being a base field.
After a bit of debugging, the problem turned out to be that the uid field had a base field override. Combined with the problem that we checked the wrong FieldConfigInterface (the one in Drupal\Core covers both configurable fields and base field overrides) and in the other case checked for BaseFieldDefinition which was then not true anymore.
Proposed resolution
Use Drupal\field\FieldInterface in both cases.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#10 | interdiff-2946102-7-10.txt | 1.47 KB | johnchque |
#10 | paragraphs-fieldconfiginterface-2946102-10.patch | 3.86 KB | johnchque |
| |||
#10 | paragraphs-fieldconfiginterface-2946102-10-test-only.patch | 1.81 KB | johnchque |
#7 | interdiff-2946102-4-7.txt | 1.18 KB | johnchque |
#7 | paragraphs-fieldconfiginterface-2946102-7.patch | 4.8 KB | johnchque |
|
Comments
Comment #2
BerdirComment #3
johnchqueWill add tests for this.
Comment #4
johnchqueAdding tests. :)
Comment #7
johnchqueMaybe now.
Comment #9
BerdirYou should do this in the test class, not in the test plugin.
Comment #10
johnchqueIndeed, my bad.
Comment #13
BerdirLooks good I think.
Comment #15
miro_dietiker:-) Committed