[PP-2] Remove route renames and aliases for node

Created on 11 August 2025, 14 days ago

Problem/Motivation

In 📌 [PP-1] NodeRouteProvider should extend DefaultHtmlRouteProvider Needs work we are doing 2 things to keep BC for existing routes:

1. In NodeRouteProvider 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 to 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

Steps to reproduce

N/A

Proposed resolution

Remove NodeRouteProvider::getRoutes
Reverse the aliases in node.routing.yml so the old routes are aliased to the new routes.

Remaining tasks

Postponed on 📌 [PP-1] NodeRouteProvider should extend DefaultHtmlRouteProvider Needs work
Postponed on 📌 Add an API for comparing the (current) route name that takes into account deprecated routes Active

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

node system

Created by

🇦🇺Australia acbramley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024