Problem/Motivation
Follow up to #2443119: Views preview not working for REST display
Dynamic routes in views should be prefixed with views.view rather then view, to increase maintainability we need to think about introducing a prefix constant here.
While we are fixing routes in views, RouteSubscriber::alterRoutes() should be cleaned up, we should not remove the route from the collection there since this is already handled in PathPluginBase::alterRoutes
Remaining tasks
Change dynamic route prefix from view to views.view
Create a route prefix constant and us that to prefix any dynamic routes in views
Cleanup RouteSubscriber::alterRoutes()
User interface changes
None
API changes
Introduce prefix constant
Beta phase evaluation
Comments
Comment #1
geertvd commentedComment #2
geertvd commentedComment #3
geertvd commentedComment #4
alexpottHere's a patch that carries out the tasks described in the issue summary. I guess we might have some simpletest failures.
Comment #6
alexpottMaybe the disruption of actually changing the prefix is not worth it.
Comment #8
alexpottComment #9
dawehnerIts a bit odd that its part of the interface ... I think, but I don't have a better suggestion.
What about at least naming it ROUTE_NAME_PREFIX?
+1 This is a bit easier to read.
I'm confused, didn't we used view.... as prefix above?
Comment #11
dawehnerIMHO at that point its a break without that much of a benefit. Feel free to disagree with me, but I would rather move this to D9.
Comment #12
catchHmm if we ever want to do this we should add the constant in 8.x and change the vale in 9.x
Comment #26
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #28
smustgrave commentedBelieve this one to still be valid.