Closed (fixed)
Project:
Module Builder
Version:
4.0.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Oct 2024 at 15:01 UTC
Updated:
24 Sep 2025 at 21:29 UTC
Jump to comment: Most recent
Comments
Comment #2
ekes commentedI'm getting this on a new module at the moment.
I note there is a
canonicallink template:https://git.drupalcode.org/project/module_builder/-/blob/4.0.x/src/Entit...
But there isn't a
view_builderhandler:https://git.drupalcode.org/project/module_builder/-/blob/4.0.x/src/Entit...
Both of which are required to build the route in the inherited
route_provider.Comment #3
joachim commentedAre you using the same module that Ru is which complains about canonical templates?
I can't reproduce your problem.
Comment #4
ekes commentedWhich module is that? Could be. It's a council's website.
I just installed Module Builder, to generate, a new module and a couple of plugins, but this time I'm not getting past submitting the new module from. Removing the link template, the form submits, but then just leads me to a whole other set of errors however.
Comment #5
joachim commentedYeah, module_builder_entity_type_build() expects to find it, because it dynamically adds further templates and needs a base URL.
Ru had some module which was crashing when config entities had a canonical template.
Try changing it to 'edit-form' in module_builder_entity_type_build(), since that has the same path.
Comment #6
ekes commentedFWIW I just had a quick look at media entity (which also sometimes has canonical the same path as edit-form) it does still have a view builder defined in the handlers... ah that's for the case where it does have a standalone url. In the other cases the
route_providerclass returns the edit form route for the canonical route: https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/media...Comment #7
ekes commentedRemoving the canonical link template, and changing the line in module_builder_entity_type_build() has also so far worked.
Comment #10
joachim commentedThanks!
I'm not sure this fixes the original problem, so leaving open
Comment #11
joachim commentedIt no longer crashes - there's a form validation error.
But I've added disabling of the radios for existing modules + a description with a link.