Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andreas Nordmand Andersen 4 posts 74 karma points
    Aug 20, 2021 @ 16:29
    Andreas Nordmand Andersen
    0

    Redirect URL Management does not use the custom Url Provider when updating name and creating redirect rules

    Hi there.

    I am currently developing a new website in Umbraco 8 where I have implemented a custom URL provider (and a custom content finder of course).

    The custom URL Provider basically removes a part of an URL for any content that might be created below a certain type of document in Umbraco (all the way down in the tree structure).

    I did use the same tactic on a website using Umbraco 7 with URL Tracker. When I am saving a node in Umbraco 7 using URL Tracker it creates the redirect rules in a correct matter.

    In Umbraco 8 the URL Tracker doesn't seem to exist anymore. So for now I only use the "Redirect URL Management" that comes with Umbraco 8.

    My problem is that Umbraco 8 doesn't seem to respect the custom URL provider when creating a new redirect rule.

    Below is an example where the document with the name "omrade" gets excluded from all children due the the custom URL provider and where I have saved a document below the node "omrade":

    enter image description here

    When I update the name of a child document, Umbraco 8 does not seem to use the custom URL provider when creating the redirect rules. This seems to be a bug in my opinion?

    My question is... Do anyone know a way to maybe hook into the the event of when Umbraco is "creating the redirect rules"? Or maybe someone got an other good suggestion?

    I have thought about adding the redirect "url" manually on the "saving event" of the document. However, my problem here is that I am not sure, how to test if the url has been changed other than looking if the "Name" of the document "is dirty ". This raises alot of other problems, since that approach would not work for any child document that might exist below the saved Umbraco document, which I would also need to add in this case as well.

    Any information or suggestion on how to solve this problem would be greatly appreciated :)

    Cheers Andreas Nordmand

  • Lee Howarth 1 post 71 karma points
    Jan 14, 2022 @ 16:56
    Lee Howarth
    0

    We are having the same issue as this in Umbraco 9.01. Was there any resolution to this?

  • Rune Grønkjær 1371 posts 3102 karma points
    Dec 21, 2022 @ 12:38
    Rune Grønkjær
    0

    And the same problem is in Umbraco 10. Was there any resolution to this? :)

Please Sign in or register to post replies

Write your reply to:

Draft