Score:0

Is there any danger in uninstalling Redirect module?

mp flag

Drupal 9.5.3 with no core customizations and very few contrib modules:

  • Redirect
  • Asset Injector
  • Token

All nodes in this website have alternative aliases such as example.com/my-first-node instead of example.com/node/1.

When creating the website nearly a year and a half ago I have also installed Redirect. I don't recall why exactly. But I know for certain, that I didn't do anything with it "manually".

When I came to uninstall Redirect I got a message that:

There is content for the entity type: Redirect | Remove entities Redirect (link)

If I click the link to remove the entity type I get a list of ten nodes.

Why do I get a list of ten nodes? I don't recall every associate these specific nodes with redirect.

Given these data, at last, is there any danger in uninstalling Redirect module?

Score:2
cn flag

The Redirect module has this setting

[x] Automatically create redirects when URL aliases are changed.

which is enabled by default.

If you delete the redirects you get a 404 instead of a 301 for the old aliases.

It's not dangerous to uninstall the Redirect module, but you lose the information the old aliases ever existed.

This is not to be confused with route normalization, which the module also provides:

[x] Enforce clean and canonical URLs.

  • Enabling this will automatically redirect to the canonical URL of any page. That includes redirecting to an alias if existing, removing trailing slashes, ensure the language prefix is set and similar clean-up.

This automatically redirects the internal path /node/123 to the alias so that the user always sees the alias in the address bar. This functionality doesn't store data and can be re-enabled by installing the module again, without data loss.

somo avatar
mp flag
So if I uninstall the module each `/node/NUMBER` will no longer redirect to its corresponding `/node/ALIAS`, correct?
id flag
Aliases are different than redirects.
somo avatar
mp flag
I don't recall ever creating a 301 redirect with Redirect in this particular website. Let along, for the ten nodes in the list.
apaderno avatar
us flag
@somo As this answer says, you do not need to manually create redirects: The Redirect module creates them when path aliases are changed.
somo avatar
mp flag
@apaderno what is an example for this scenario? I mean, if we create node/1 and then delete and then create another node, then this other node would be node/2. Allegedly, node/1 has "gone forever". What am I missing?
somo avatar
mp flag
If I delete the module than `/node/NUMBER` will never be redirecting to `/node/RELEVANT_ALIAS`?
4uk4 avatar
cn flag
No, this is only for redirects /OLD_ALIAS -> /RELEVANT_ALIAS and only for nodes where you had different aliases while the module Redirect was installed.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.