Skip to content

Self-referencing redirects can be generated when a node is renamed and then changed back to the original name #20139

@ProNotion

Description

@ProNotion

Which Umbraco version are you using?

13.10.0

Bug summary

If a user renames a page and publishes it, then changes the name back and publishes it again - a self referencing redirect is created.

Specifics

We have our own custom IRedirectUrlService (cloned from the Umbraco source) so that we can trigger webhook notifications when new urls are registered since the feature is missing currently in Umbraco 13.x.x. Using the method above to replicate this issue means we end up with 2 redirects which results in this situation.

        {
            "key": "f222be25-2369-412b-b09a-83ee769821d3",
            "sourceUrl": "https://example.com/another-redirect-test/",
            "targetUrl": "https://example.com/another-redirect-test-2/",
            "permanent": true,
            "retainQuerystring": false,
            "force": false,
            "created": "2025-09-15T15:56:23.49Z",
            "updated": "2025-09-15T15:56:23.49Z"
        },
        {
            "key": "5f0841b9-55c6-4197-9a13-1a14000826e4",
            "sourceUrl": "https://example.com/another-redirect-test-2/",
            "targetUrl": "https://example.com/another-redirect-test-2/",
            "permanent": true,
            "retainQuerystring": false,
            "force": false,
            "created": "2025-09-15T15:56:11.043Z",
            "updated": "2025-09-15T15:56:11.043Z"
        }

We have tried to cancel the registration of the 2nd redirect, however, the method is never called when the node is renamed back to the original name.

Steps to reproduce

  1. Create a node
  2. Publish the node
  3. Change the name of the node
  4. Publish the node
  5. Change the name of the node back to what it was originally
  6. Publish the node

Expected result / actual result

A redirect should not be created that would result in both the source and target urls being the same.


This item has been added to our backlog AB#61504

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions