Closed (works as designed)
Project:
Drupal core
Version:
8.4.x-dev
Component:
routing system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
1 Apr 2017 at 10:41 UTC
Updated:
4 Apr 2017 at 08:09 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
jonathan1055 commentedPatch creates three routes (even though I only need one of them, it is compete to make all three)
Comment #3
larowlanThey are provided by the field ui module
Comment #4
jonathan1055 commentedThanks for the reply. However, I cannot see those routes in core/modules/field_ui/field_ui.routing.yml. That file does not have any routes starting with
/admin/structure/types/manage. I have searched the whole codebase of core and can only find /admin/structure/types/manage/{node_type} and /admin/structure/types/manage/{node_type}/delete and they are both in node.routing.ymlMaybe there is another place where routes are defined? Or somehow the string '/admin/structure/types/manage' is not present but parameters used instead, such that my searching fails. I'm sorry to reopen this issue, but I need to see what route resolves to
/admin/structure/types/manage/{node_type}/form-displayand if core does not provide one then my patch above will be useful.Thanks
Jonathan
Comment #5
jonathan1055 commentedOK, I have now, via the Devel module route info, found the routes. See attached.
But how they are created if they do not appear in any .routing.yml file? There must be a dynamic way these routes are derived.
Comment #6
larowlanYep, they are added dynamically based on all the fieldable entity-type definitions - see \Drupal\field_ui\Routing\RouteSubscriber::alterRoutes
As the fieldable entity types cannot be known in advance, the routes cannot be declared via YAML.
Comment #7
jonathan1055 commentedThank you very much larowlan for taking the time to explain. Yes, it makes sense that there had to be some way to define dynamic routes, I am learning new things about Drupal8 all the time. Having felt reasonably skilled at D7 it's now a whole new set of things to get my head around with 8.x.