Copied to clipboard

Flag this post as spam?

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


  • maanehunden 61 posts 105 karma points
    Oct 21, 2013 @ 16:45
    maanehunden
    1

    Error using "Multi-site Page Not Found" datatype with umbraco 6x

    Hi fellow developers

    I was surprised to find out that "Multi-site Page Not Found" was returning the wrong node, all thou my setup was correct. I have used this datatype many times with Umbraco 4.x.

    It looks like Domain.GetRootFromDomain(domainName) is returning the row number from umbracoDomains table instead of the "domainRootStructureID" that is needed to get the rootnode id,..

    The current code seen here http://ucomponents.codeplex.com/SourceControl/latest#uComponents.NotFoundHandlers/MultiSitePageNotFoundHandler.cs

        // get the root node id of the domain
        var rootNodeId = Domain.GetRootFromDomain(domainName);
    

    should be changed to something like this to work properly:

        Domain domain = Domain.GetDomain(domainName);
        var rootNodeId = domain != null ?  domain.RootNodeId : 0; 
    

    i would appreciate if someone committed this change.

    Cheers /Mannehunden

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Oct 28, 2013 @ 18:15
    Lee Kelleher
    0

    Hi Mannehunden,

    Thanks for posting this - I'm not ignoring you, I was just away last week.

    I'll take a look over the code amends later week (I'm playing catch up at the moment) ... unless you want to make a pull-request? (but I know, it's on CodePlex - yuck! I totally understand)

    Cheers,
    - Lee

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Oct 31, 2013 @ 11:07
    Lee Kelleher
    0

    Hi Mannehunden,

    I've taken a look at the Umbraco core to see what might have changed, but I can't find anything to suggest that Domain.GetRootFromDomain is returning the row Id. The core looks to be returning the root node Id (from the domainRootStructureID column in the umbracoDomains table).

    I'm wondering if it could be related to this issue? U4-2006 Domain.GetDomain(string DomainName) is case-sensitive

    Thanks,
    - Lee

Please Sign in or register to post replies

Write your reply to:

Draft