Problem/Motivation
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.display_builder_instance.collection" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 242 of core/lib/Drupal/Core/Routing/RouteProvider.php).
Proposed resolution
--- a/src/Plugin/display_builder/Island/InstancesPanel.php
+++ b/src/Plugin/display_builder/Island/InstancesPanel.php
@@ -42,6 +42,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
type: IslandType::View,
region: 'sidebar',
icon: 'files',
+ modules: ['display_builder_ui'],
)]
class InstancesPanel extends IslandPluginBase {
Comments
Comment #3
pdureau commentedComment #4
mogtofu33 commentedThanks for the issue and the solution.
I do not think it is a good idea to remove the whole Island when
display_builder_uiis disabled just for some partial links.The switch feature is still valid and useful (every other builder offer this switch), I will push an approach where Island is still available.
Comment #6
mogtofu33 commentedHere is my proposition, tackle only the root of the problem so the island can still be used.
Comment #7
pdureau commentedI agree :)
I have tested the MR and I was ready to RTBC:
✅ with
display_builder_ui:✅ without
display_builder_ui:But I don't understand this part of the MR:
Why the front page as a fallback if we don't print the link anymore? Where exactly do we print this link to front page when
display_builder_uiis not activated?. Landing to the front page may confuse the user.Comment #8
mogtofu33 commentedGood catch, thanks. The fallback was wrong, it is gone.
The front page link was printed in one place only: the Instances panel, "Views" group, when both
display_builder_uiandviews_uiare off. A view display not built with Display Builder linked to the Views UI edit form, fell back to the instance list, then to the front page.Now:
ViewDisplay::viewEditUrl()returns NULL withoutviews_ui. A display with nothing to link to is not listed, same as entity view displays withoutfield_ui. A built display keeps its builder link, with no settings link.instanceCollectionUrl()is removed. The "unknown instance ID" fallbacks are back to the instance list as before. Withoutdisplay_builder_uithey are not reachable: you cannot open a builder whose target no longer exists.Covered by
CollectDisplaysTest::testWithoutViewsUi().Comment #9
pdureau commentedIt works well.
I have just a nitpick (the last one, I guess).
When we mix

.db-instances__titlewith and without links, they are shifted left and right:It may be because of the shoelace button we are using inside the title.
Naive proposal:
Comment #10
mogtofu33 commentedWe must keep the button to avoid bleeding on the a, added css to fix.
Comment #11
pdureau commentedOK
Comment #12
mogtofu33 commented