"Create a new alias" doesn't Delete the Old Alias

Created on 31 January 2025, 6 months ago

Problem/Motivation

"Create a new alias. Delete the old URL alias." does not delete the old URL alias and simply creates a new one. Also, the "Do nothing. Leave the old alias intact." option still creates a new URL alias.

Steps to reproduce

This is for Drupal 10.3.10 and Pathauto 8.x-1.13. I have the "Create a new alias. Delete the old alias." option selected for the "Update action" setting for Pathauto. I also have a Pathauto pattern that uses the parent menu link and the node title: [node:menu-link:parent:url:relative]/[node:title].

When I change the menu parent for the node, a new URL alias is created and the previous one is deleted, as would be expected. However, when the node title is changed, a new URL alias is created, but the old one is still kept.

People have previously reported duplicate URL aliases created with the above "Update action" option: Duplicate alias entities created with 'Create a new alias. Leave the existing alias functioning' setting 🐛 Duplicate alias entities created with 'Create a new alias. Leave the existing alias functioning' setting RTBC . However, in my case the two URL aliases are different.

Also, the "Do nothing. Leave the old alias intact." option creates a new URL alias when the node title is changed. Hence, it looks like, in my case, when the node title is modified, Pathauto behaves according to the "Create a new alias. Leave the existing alias functioning." option and ignores the selected option in the "Update action" setting.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.13

Component

Code

Created by

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

Comments & Activities

  • Issue created by @mvnovick
  • First commit to issue fork.
  • 🇭🇷Croatia milosr Croatia, Montenegro

    Hi @mvnovick

    I have tried multiple times to reproduce the issue, but I was not able to. Everything is working normally as expected.

    Can you try to reproduce the issue on a clean Drupal installation? Because I couldn't. This seems like an internal issue specific to your site.

    Try it on a fresh installation and let me know if the problem persists...

    Or, if possible, send the Git repository so I can take a look.

  • It looks like the culprit is the Parent Node Path Auto module. When I use a Pathauto pattern that uses the parent page relationship, the Pathauto settings for updating URL aliases are no longer respected. I will report this an an issue for the Parent Node module.

  • Status changed to Closed: works as designed 4 months ago
  • 🇭🇷Croatia milosr Croatia, Montenegro
Production build 0.71.5 2024