Copied to clipboard

Flag this post as spam?

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


  • Isak 6 posts 27 karma points
    Apr 05, 2017 @ 13:30
    Isak
    0

    UrlProvider conflicts

    Hi!

    I have just upgraded a umbraco site from 7.1.3 to 7.5.11.

    This project uses a quite special setup. it has gotten 20-ish domains connected to it, one domain for each region the company operates in. Every domain has an own home node in umbraco. Like this:

    -- Home

    ---- Region 1 (www.region1.se)

    ---- Region 2 (www.region2.se)

    ---- Region 3 (www.region3.se)

    I have written custom UrlProviders and content finders to deal with this, stripping away the "regionX" (and other folder-nodes that are only there for improved structure) so the url

    www.region1.se/region1/folder/page

    becomes

    www.region1.se/page

    This has been working good in 7.1.3.

    However, now in 7.5.11, i get this message in the "link to document" field in backoffice: "This document is published but its url would collide with content [path/to/content]"

    Some nodes aren't even accessible in the backoffice. They throw this error:

    An error occured
    
     Mapping types:
     Content -> String[]
     Umbraco.Core.Models.Content -> System.String[]
    
     Destination path:
     ContentItemDisplay.Urls.Urls
    
     Source value:
     Umbraco.Core.Models.Content
    
    EXCEPTION DETAILS
    
    AutoMapper.AutoMapperMappingException: 
    
     Mapping types:
     Content -> String[]
     Umbraco.Core.Models.Content -> System.String[]
    
     Destination path:
     ContentItemDisplay.Urls.Urls
    
     Source value:
     Umbraco.Core.Models.Content
    

    Worth noting is that the frontend is working as expected. no problems there.

    Is there any way of solving this issue? or a better way of routing different domains to different home nodes?

  • Dave Woestenborghs 3504 posts 12134 karma points MVP 9x admin c-trib
    Apr 06, 2017 @ 11:53
    Dave Woestenborghs
    0

    Hi Isak,

    Can you provide the code for the UrlProviders and Contentfinders. That way we could try to spot the issue.

    Also in 7.5.4 (i think ) a new version of Automapper is being used in the core. Can you check if your code references that version of Automapper as well. The exceptions you are showing are related to automapper.

    Further more, do the region pages have a domain assigned in Umbraco ?

    Dave

  • Isak 6 posts 27 karma points
    Apr 12, 2017 @ 08:05
    Isak
    1

    Hi!

    Thanks for your reply!

    I managed to find the issue however. I had registered a custom 404-content finder that incorrectly threw an exception (which I somehow failed to notice). I fixed that and now everything is working smoothly again.

    Stupid mistake -_-

    Thanks again for your time!

    Isak

Please Sign in or register to post replies

Write your reply to:

Draft