- Issue created by @pdureau
- 🇫🇷France pdureau Paris
Grimreaper 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.
- First commit to issue fork.
- Merge request !4Issue #3529127 by pdureau: Allow to enable Display Builder even when Layout... → (Merged) created by Grimreaper
- 🇫🇷France Grimreaper France 🇫🇷
Inspired 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.
- 🇫🇷France Grimreaper France 🇫🇷
With 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.
- 🇫🇷France Grimreaper France 🇫🇷
As 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.
- 🇫🇷France Grimreaper France 🇫🇷
MR ready for test and discussions.
override per content was not handled or I missed that?
- 🇫🇷France pdureau Paris
override per content was not handled or I missed that?
Planned for Alpha3: 📌 [1.0.0-alpha2] Add content display overrides Active
- 🇫🇷France just_like_good_vibes PARIS
pdureau → credited just_like_good_vibes → .
- 🇫🇷France mogtofu33
Looking 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. - 🇫🇷France mogtofu33
Message fixed.
I have a problem from a clean install, all caches ON, no dev only verbose error logging:
- Layout builder is NOT enabled
- Go to ui modules list and enable display_builder_entity_view
- Accept other modules including layout builder
- Submit, error appear:
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
? - 🇩🇪Germany Christian.wiedemann
Or 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?
- 🇫🇷France Grimreaper France 🇫🇷
Strange because I have added layout_builder as a dependency.
I will try to reinstall with MR applied before install.
- 🇫🇷France Grimreaper France 🇫🇷
I also have the error, I will try to debug after a meeting.
- 🇫🇷France Grimreaper France 🇫🇷
The problem is from
function layout_builder_install(): void { $display_changed = FALSE; $displays = LayoutBuilderEntityViewDisplay::loadMultiple();
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.
- 🇫🇷France Grimreaper France 🇫🇷
$displays = \Drupal::entityTypeManager()->getStorage('entity_view_display')->loadMultiple();
fixes the issue
I will search for an existing core issue and/or create a new one if needed.
- 🇫🇷France Grimreaper France 🇫🇷
MR created on 🐛 Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay class does not correspond to an entity type. Needs work
- 🇫🇷France Grimreaper France 🇫🇷
I don't see any commit related to this issue on 1.0.x.
Has it been merged?
-
mogtofu33 →
committed 85e4c20c on 1.0.x authored by
grimreaper →
Issue #3529127 by pdureau: Allow to enable Display Builder even when...
-
mogtofu33 →
committed 85e4c20c on 1.0.x authored by
grimreaper →