U4-9669 - URL redirects are not created when publishing a draft that changes the node name.

Created by Andy 23 Mar 2017, 14:39:25 Updated by Nik 01 Aug 2018, 07:44:04

When you save a draft that will cause a name change, at the point that it is published the URL redirect is not created.

Steps to reproduce:

  • Create and publish a new node /my-new-node.
  • Save changes (draft) to the node including a new node name (my super node)
  • Go back to the node later and perform a save & publish
  • The node url is now /my-super-node but no redirect is created.

This could relate to U4-9511

Comments

Mads Krohn 13 Mar 2018, 12:24:36

Just stumpled upon this one as well, can confirm it's still an issue in 7.9.2


Nik 01 Aug 2018, 07:43:42

This issue still exists in 7.10., I suspect it still exists in 7.11. as well.

The issue is due to the check in the RedirectTrackingEventHandler.cs ContentServices_Publishing method around line 172 - 190. When you are publishing a saved node (rather than doing a save an publish at the point of your change) oldSegment and newSegment and up being equal.

I'm not sure exactly how we change this check to get it to work properly but it's quite a big issue with the redirect behaviour. I also believe it affects scheduled publishes as well (so if using the publish at functionality).

I'm surprised more people haven't come across this to be honest.

  • Please note, I tested this is 2 existing sites and a clone of the Umbraco source, with the start kit installed (Umbraco source was at version 7.12 at time of testing)


Priority: Normal

Type: Bug

State: Submitted

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.5.11, 7.10.4

Due in version:

Sprint:

Story Points:

Cycle: