Closed (fixed)
Project:
Display Builder
Version:
1.0.x-dev
Component:
Main / Misc.
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Jun 2025 at 10:41 UTC
Updated:
10 Feb 2026 at 14:09 UTC
Jump to comment: Most recent
Comments
Comment #2
pdureau commentedComment #3
pdureau commentedComment #4
mogtofu33 commentedComment #5
pdureau commentedDuring the work on #3531523: Migration from Layout Builder (config only) we tried to import Layout plugins as SDC:
hook_component_info_alter(forbidden by SDC but restored by UI Patterns) but any try to call an other plugin manager from this hook caused a PHP memory lilmitCore's
ComponentPluginManager::getDiscovery(): DirectoryWithMetadataPluginDiscoveryis making the direct override of the method difficult, but we can overrideComponentPluginManager::findDefinitions()and add the discovery here:Then we can add a SDC component to deriver:
Unfortunately, we have:
Comment #6
pdureau commentedComment #7
pdureau commentedComment #8
pdureau commentedWe may need a ComponentSource plugin type, like Canvas does, with 3 plugins:
page.html.twig, to address #3547979: Import initial config from block layoutComment #10
pdureau commentedWork has started. It is going well.
It was not necessary, there is a more elegant way: a small
SourceWithSlotInterfacefor source plugins.Comment #11
pdureau commentedWork in progress.
The main job is to move SDC related logic from
BuilderPanel::buildSingleComponent()andLayersPanel::buildSingleComponent()to the implementation of the newSourceWithSlotInterfaceinComponentSourceandLayoutSource.Not much is left to do. Main tasks:
To discuss:
::settingsForm()method because Dispaly Builder doesn't need them there (they are managed byBuilderPanelLayersPanelandTreePanel). It may be confusing when the source is using in UI PatternsLayersPanel::buildComponentSettingItem()and its is not clear what are we losing here (apart the component variant in the component label, which can be easily moved to::settingsSummary())Comment #12
pdureau commentedComment #13
pdureau commentedHi Jean,
Pipeline is green (I guess, still running) and work is nearly completed (a few things to check, TreePanel, some optional TODOs...) so it would be a good moment to discuss together about what has be done here.
It is an important work because it moves most of SDC specific logic from
ApiController,Instanceentity,LayersPanel,BuilderPanelandContextualPaneltoComponentSourceimplementingSourceWithSlotInterface.By that, we are allowing the introduction of other slot source plugins with slot support (like
LayoutSource). Also, we are future proofing our usage ofComponentSourcebecause we are not playing with the internal of its data structure (which is sometime weird) anymore.Comment #14
pdureau commentedooops... a playwright fail. i will have a look.
Comment #15
mogtofu33 commentedI added a link on a failing Playwright job on the right panel : External links > Playwright test report.
So you can see the problem, it's a service, seems you assume layout_discovery is enabled.
Comment #16
pdureau commentedThanks a lot for the hint, Jean, those playwright test results are so useful.
I got the same error if I remove in my local dev environment:
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "plugin.manager.core.layout". Did you mean one of these: "plugin.manager.condition", "plugin.manager.views.sort"? in Drupal\Component\DependencyInjection\Container->get() (line 157 of core/lib/Drupal/Component/DependencyInjection/Container.php).It seems they are 2 different issues here:
LayoutSourceplugin (for example, entity view display after import from Layout builder), we need to implementDependentPluginInterface::calculateDependencies()to also avoidPluginNotFoundExceptiononceServiceNotFoundExceptionis fixed. This may trigger the removal of the display instead of block the uninstall of the module, but this issue is already covered by #3562750: Field, Theme or module uninstalled.LayoutSource, this error is showing another issue, something missing in the logic ofBlockLibraryPanel::getSources()I will try to fix both in a single commit.
Comment #17
pdureau commentedOnce the pipeline is green and the review is positive, let's not merge the work directly.
I will create an issue on UI Patterns project to move those files there:
This will allow:
src/Hook/UiPatternsHooks.phpSourceWithSlotsInterfacedirectly in UI Patterns, for example to simplifyComponentElementBuilder(we can add soemthing likeSourceTreeRendererInterface::renderSources()which will be usable in Display Builder)Then, we can resume the work here, with a cleaner MR.
Comment #18
pdureau commentedHi Jean,
I am not reproducing locally the playwright fails from pipeline:
Locally, everything is OK expect a little KO ("Create override— Tests/entity_view.spec.ts:187") not related to the current work.
So I guess it is time for review :)
By the way:
::settingsForm()method because Dispaly Builder doesn't need them there (they are managed byBuilderPanelLayersPanelandTreePanel). It may be confusing when the source is using in UI Patterns. Something will be done in a UI Patterns MR to mitigate that.LayersPanel::buildComponentSettingItem()and its is not clear what are we losing here (apart the component variant in the component label, which can be easily moved to::settingsSummary())If you are OK, put the issue in "RTBC" without merging, I will switch to UI Patterns for the next step.
Comment #19
pdureau commentedBy the way, to test this feature, you need to build a entity view display with Layout Builder using non SDC layouts first, and then switch to Display Builder. The layout sources will be imported.
Comment #20
mogtofu33 commentedYou cannot reproduce locally because you have layout_builder enabled.
I still have the issue:
Seems we call
LayoutSourcewhen out of layout context.To reproduce:
Comment #21
mogtofu33 commentedAdded a requirement on layout_discovery module in the LayoutSource, seems good, keep going on review.
Comment #22
pdureau commentedThanks a lot
Comment #23
pdureau commentedI don't know why I reassigned the issue to me when i wrote the "Thanks a lot" comment 🤔
Giving back to you
Comment #25
mogtofu33 commented