Copied to clipboard

Flag this post as spam?

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


  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jun 02, 2017 @ 08:08
    Jeroen Breuer
    0

    UrlProvider causes "url would collide with content" error

    Hello,

    I have a language node which does an internal redirect to the underlying home node. Since the home node and language node show the same page I wanted to give them the same URL. I've always used a HomeUrlProvider for this. See this blog: https://24days.in/umbraco-cms/2014/urlprovider-and-contentfinder/

    This has always worked, but since somewhere in Umbraco 7.5 it results into the following error when I try to show the URL in the backoffice: This document is published but its url would collide with content /Website/NL (id=1075)

    Is there a way around this? I know the URL collides, but since I'm using an internal redirect that's not a problem.

    As a workaround I can see the URL when using my Url Preview package: https://our.umbraco.org/projects/backoffice-extensions/url-preview/

    Jeroen

  • Stephen 767 posts 2273 karma points c-trib
    Jun 02, 2017 @ 08:24
    Stephen
    0

    So IIC you have node "Site in English" with subnode "Site in English / Home", and "Site in English" does an internal redirect to "Site in English / Home", and both should have the same "/en" url - correct?

    It worked in 7.5 because you did not detect collisions... so you would have two nodes effectively having the same "/path/to/node" url, and Umbraco would end up randomly routing inbound requests to one or the other in a very confusing way.

    7.6 prevents this by deciding that the "topmost" node owns the url, and other nodes wanting to have the same url end up in error. Point is, the inboud routing cannot accept that two nodes have the same urls, else it cannot figure out what to do. There is no way, at the moment, to work around this.

    A proper fix would require that we find a way to tell Umbraco that in this case it is ok to share the url, with this node "owning" it somehow. Not sure how to do it, though.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jun 02, 2017 @ 08:32
    Jeroen Breuer
    0

    You are correct :-).

    I'm not sure in what other cases you would want to share a url in Umbraco. Maybe if an internal redirect is detected it's ok for the node that which the internal redirect goes to that it can "own" the url?

    Jeroen

  • Stephen 767 posts 2273 karma points c-trib
    Jun 02, 2017 @ 08:49
    Stephen
    0

    Mmm... that could be a way, yes... will try to look into it... (busy week :)

Please Sign in or register to post replies

Write your reply to:

Draft