301RedirectModule icon indicating copy to clipboard operation
301RedirectModule copied to clipboard

Moving item to same location, sorting, will create a redirect item

Open ThomasBaek opened this issue 8 years ago • 4 comments

If a user is dragging a sitecore to the same location, but in a different sorting, the module will create a redirect item anyways, causing a infinite loop.

ThomasBaek avatar Apr 21 '17 09:04 ThomasBaek

cc @Chris-Castle I'm still waiting for a Sitecore license so I can test this.

cadamsdotcom avatar May 31 '17 19:05 cadamsdotcom

I have this same issue, looking for a solution. Is there a way to prevent the Redirect Module from genrating a redirect when the item has moved but the path has not changed?

estockwell-alpert avatar Sep 06 '18 15:09 estockwell-alpert

I have a fix for this issue. Add this line on line 27 of AutoCreateRedirectOnMove.cs, in the OnItemMoved method:

if (oldParentID == item.ParentID) return;

This should prevent it from creating redirects when the path has not changed.

estockwell-alpert avatar Sep 06 '18 15:09 estockwell-alpert

Just merged https://github.com/thecadams/301RedirectModule/pull/44 - please feel free to close this if that will resolve! Thanks all :)

cadamsdotcom avatar Sep 06 '18 21:09 cadamsdotcom