Steps to reproduce:
- On admin/structure/types/manage/article/fields, create a new text field.
Submit the steps leaving default values, until you get back to the "Manage Fields" screen
- Visit admin/structure/types/manage/article/display/teaser : fatal error, unsupported operand type
Explanation:
Field UI creates fields and only adds explicit display settings for the 'default' mode, leaving the field hidden in all other modes. That's the expected behavior.
In #1785748: Field formatters as plugins we removed the fact that field_info_instance() "prepared" $instance['display'] to contain display settings for all existing view modes, including the ones not present in the definition that's actually stored - this more friendly memory-wise.
This is has been taken care of at entity_view() runtime, when determining the formatter to use for a field, nothing in $instance['display'][$view_mode] means 'field is hidden'.
This surprises Field UI, though, which still expects the entry to be present and tries to instanciate a formatter plugin with an invalid NULL argument.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | field_ui_fatal-1848040-1-test-only.patch | 1.4 KB | yched |
| #1 | field_ui_fatal-1848040-1.patch | 2.37 KB | yched |
Comments
Comment #1
yched commentedPatch, with an added test
+ test-only patch
Comment #2
yched commentedComment #3
yched commentedTests finished, but it seems the results never got back to the issue.
So, 'test only' patch failed as expected : http://qa.drupal.org/pifr/test/390538
And full patch passed : http://qa.drupal.org/pifr/test/390543
Comment #4
swentel commentedGreat!
Comment #5
catchThanks! Committed/pushed to 8.x.