Be able to protect internal/module routes from redirects

Created on 25 September 2024, 3 months ago

Problem/Motivation

There is a very interesting case that happened to me recently. We have a website, where someone created a redirect from /media-library to some other node. The /media-library is a valid route defined in media_library.routing.yml and is part of the module.
What happens now is that every request to /media-library actually redirects to the node that was defined in the redirect record, breaking the functionality of the Media library module.

A website editor cannot really prevent this from happening, as he/she is not aware of all possible Drupal routes and paths. Since there is no protection mechanism for module/core defined routes being redirected by the Redirect module, this could possibly impact any functionality that defines routes.

Remaining tasks

1. Figure out what would be the best way to tackle this issue.
2. Implement a fix in case it is decided that the redirect module will provide a mechanism to protect Drupal routes.

🌱 Plan
Status

Active

Version

1.0

Component

Code

Created by

🇧🇬Bulgaria yivanov

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

Comments & Activities

Production build 0.71.5 2024