Following #3562686: Entity view override enhancements.
Error when creating an override for an non default display
I can setup an override for the default display of a node, but not for another one (like "teaser" or "search_index").
On form submit:
Error: Call to a member function get() on null in Drupal\display_builder_entity_view\Form\LayoutBuilderEntityViewDisplayForm->createOverrideField() (line 359 of modules/custom/display_builder/modules/display_builder_entity_view/src/Form/EntityViewDisplayFormTrait.php).
Drupal\display_builder_entity_view\Form\LayoutBuilderEntityViewDisplayForm->submitForm() (Line: 108)
UX issues
Without any UI Patterns field in the bundle:
- ✅ No field selection, automatic field creation (but maybe making the field creation more explicit would help the user),
- ❌ However, the field is called
field_display_builder instead of something related to the display, is it the cause of the error?
With only "already taken" UI Patterns fields in the bundle:
- Not tested yet because of " Call to a member function get() on null" error
With already at least one UI Patterns field in the bundle:
- ✅ I can select the field
- ✅ I can also select a field previously taken then released
- ❌ But automatic creation is not available anymore.
Once a field is selected:
- ❌ it is locked, not possible to delete, change cardinality or set a default value. The same issue we have with Layout Builder today.
- ❌ releasing the field (by unselecting it from the display) is not helping, still locked
After deletion of a selected field:
- Not tested yet because locked field
Comments
Comment #2
pdureau commentedComment #3
pdureau commentedComment #4
pdureau commentedHi Jean, assigned ot you because it is a follow-up of a ticket of yours.
Comment #5
mogtofu33 commentedWill check, so you know for the lock part, we cannot unlock a locked field, must be deleted from config.
We can adapt the name but the field storage is the same, the field config only change for the same entity, do we want a different storage name?
Comment #7
mogtofu33 commentedPHP error fixed. Lock and unlocked fixed.
We have a name limitation, so replaced default name to a simple
filed_NODETYPE_BUNDLE_VIEWMODE.We still have non covered cases when deleting / changing the field, but they are hard to address simply. Will be a follow up case by case if required, better to start simple with something that match the need with less confusion for regular users.
Comment #8
pdureau commentedWithout any UI Patterns field in the bundle or without any UI Patterns field in the bundle:
filed_NODETYPE_BUNDLE_VIEWMODEmay not be the right naming.filed_display_VIEWMODEmay be better because:With at least one UI Patterns field available in the bundle:
Once a field is selected:
I will propose a commit with the new field name, a bit of wording, and maybe a fix.
Comment #10
pdureau commentedMy commit is here if you are interested: https://git.drupalcode.org/project/display_builder/-/merge_requests/246
Comment #11
mogtofu33 commentedYour MR is failing: https://project.pages.drupalcode.org/-/display_builder/-/jobs/8793599/ar...
Comment #12
pdureau commentedhttps://git.drupalcode.org/project/display_builder/-/merge_requests/246/... is green now
Comment #15
mogtofu33 commented