Closed (fixed)
Project:
Display Builder
Version:
1.0.x-dev
Component:
display_builder_entity_view
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Jun 2025 at 10:22 UTC
Updated:
15 Jul 2025 at 07:17 UTC
Jump to comment: Most recent
Comments
Comment #2
pdureau commentedGrimreaper has a way of making them both available in a single display (we can only pick one, but both are available)
But, on the display rendering side, if we pick DB, LB is coming after and load Manage Display instead.
Comment #5
grimreaperInspired by https://www.drupal.org/project/entity_vdts
To add form element on the entity view display form when Layout Builder is enabled is OK.
But we have not found yet how to take the hand on the rendering and provide a link to the Display Builder on the entity view display form.
Comment #6
grimreaperWith proposed changes, Display Builder override Layout Builder.
Now we need to check if Layout Builder is present to call it too or not. Because not possible to enable Layout Builder on a view display anymore.
Comment #7
mogtofu33 commentedComment #8
pdureau commentedComment #9
grimreaperAs discussed, currently for a first compatibility, let's assume layout_builder is present and add it as a dependency so we can extend it to fallback to its behavior.
Comment #10
grimreaperPOC working \o/
Comment #11
grimreaperMR ready for test and discussions.
override per content was not handled or I missed that?
Comment #12
pdureau commentedPlanned for Alpha3: #3529125: Add content display overrides
Comment #13
pdureau commentedComment #15
pdureau commentedComment #16
mogtofu33 commentedLooking good, thanks!
Added a message when both are enabled, because of layout destruction on deletion it make sense to allow both to avoid loosing the layout.
Had an error on enabled but seems from my env, will double check and merge if ok.
Comment #17
mogtofu33 commentedMessage fixed.
I have a problem from a clean install, all caches ON, no dev only verbose error logging:
Drupal\Core\Entity\Exception\NoCorrespondingEntityClassException: The Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay class does not correspond to an entity type. in Drupal\Core\Entity\EntityTypeRepository->getEntityTypeFromClass() (line 111 of core/lib/Drupal/Core/Entity/EntityTypeRepository.php).This makes the display_builder config to not be installed properly (missing config default) and add some failing on the display of entity.
Do we have a way to ensure layout_builder is enabled before? perhaps with a
dependencies?Comment #18
christian.wiedemann commentedOr maybe we have two modules. The current entity_view module and a entity_view_lb which disables the entity_view module and vice verse with the code from the mr?
Comment #19
grimreaperStrange because I have added layout_builder as a dependency.
I will try to reinstall with MR applied before install.
Comment #20
grimreaperI also have the error, I will try to debug after a meeting.
Comment #21
grimreaperThe problem is from
It is trying to load from the class but at this moment entity_view_display class had already been overridden by display_builder_entity_view and so EntityTypeRepository does not find "entity_view_display" from the class LayoutBuilderEntityViewDisplay.
I will try to see if changing core a little bit will help.
Comment #22
grimreaperfixes the issue
I will search for an existing core issue and/or create a new one if needed.
Comment #23
grimreaperMR created on #3127026: Not possible to override an entity type class multiple times
Comment #24
pdureau commentedComment #25
mogtofu33 commentedComment #26
grimreaperI don't see any commit related to this issue on 1.0.x.
Has it been merged?
Comment #27
pdureau commentedComment #29
pdureau commentedComment #30
grimreaperHi,
2 points.
- Git: you can edit the default commit message in Gitlab UI, When checking the "Combine (squash) commits", there is a "Edit commit message" checkbox. Mentioning that because even if I was the commit author, I am not in the commit message, that's a detail.
- I think this may had been committed too soon, maybe we should have documented the core issue and the need to apply a patch.