- Issue created by @acbramley
In 📌 Remove BlockContentController::Add Needs work we are doing 2 things to keep BC for existing routes:
1. In BlockContentRouteProvider and BlockContentTypeRouteProvider we rename the routes from what DefaultHtmlRouteProvider::getRoutes
generates, and replace them with the existing route names. We do this rather than aliasing since we can't safely alias routes yet until
📌
Add an API for comparing the (current) route name that takes into account deprecated routes
Active
is done
2. We alias the route names that would have been generated in DefaultHtmlRouteProvider::getRoutes
to the existing routes. This gets around the following 2 issues:
- In EntityController::addPage there is a hardcoded URL generated using 'entity.' . $bundle_entity_type->id() . '.add_form'
which is rendered when there are no bundles. Aliasing entity.block_content_type.add_form</ code> to <code>block_content.type_add
fixes that.
- There are Link headers generated by the rest module that seem to only be generated if the route names match exactly what we'd expect from an entity's link template. See https://git.drupalcode.org/issue/drupal-3346394/-/jobs/5796109 for an example
N/A
Remove BlockContentRouteProvider::getRoutes
Remove BlockContentTypeRouteProvider::getRoutes (or the class entirely if it's still only doing the route rename)
Reverse the aliases in block_content.routing.yml so the old routes are aliased to the new routes.
Postponed on
📌
Remove BlockContentController::Add
Needs work
Postponed on
📌
Add an API for comparing the (current) route name that takes into account deprecated routes
Active
Active
11.0 🔥
block_content.module