Copied to clipboard

Flag this post as spam?

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


  • Gordon Saxby 1461 posts 1883 karma points
    Jul 21, 2016 @ 15:29
    Gordon Saxby
    0

    problem with path to posts

    I am working on a project which has multiple languages and has Articulate installed in each language tree. An example of the tree structure is:

    enter image description here

    The problem is that the URL to a post is

    /en/news/news/post
    

    e.g. "news" occurs twice. But also

    /en/news/news/
    

    returns a 404 error.

    /en/news/
    

    Gives the list of posts, as expected.

    So, what is the best way to solve this. Ideally, it would be nice not to have 2 levels of "news" in the URL, but especially not the 404.

  • Shannon Deminick 1526 posts 5272 karma points MVP 3x
    Jul 22, 2016 @ 08:35
    Shannon Deminick
    0

    Generally speaking, if you have more than one root node, you need to assign domains to them, otherwise the routing can do some funky things especially when the names of things overlap. Otherwise, there's a setting you can use:

    https://our.umbraco.org/documentation/reference/config/webconfig/ see: umbracoHideTopLevelNodeFromPath

  • Gordon Saxby 1461 posts 1883 karma points
    Jul 22, 2016 @ 09:26
    Gordon Saxby
    0

    It's not a problem that "en" appears in the path - the problem is that "news" appears twice and more specifically, that the first one works (/en/news) but the extra one doesn't (/en/news/news/).

    The first "News" is of type "Articulate", the second is "Articulate Archive".

    I have another site where Articulate is at the root and that seems to work fine.

  • Shannon Deminick 1526 posts 5272 karma points MVP 3x
    Jul 22, 2016 @ 09:38
    Shannon Deminick
    0

    Yes but can you confirm this does work as expected when you change umbracoHideTopLevelNodeFromPath to false? or remove your other root node so you only have one?

  • Gordon Saxby 1461 posts 1883 karma points
    Jul 22, 2016 @ 09:50
    Gordon Saxby
    0

    I can't remove the other root nodes as they contain content. I did try unpublishing them and switching umbracoHideTopLevelNodeFromPath on and off, but it is still the same.

    Is the problem caused by Articulate not being a root node?

  • Shannon Deminick 1526 posts 5272 karma points MVP 3x
    Jul 22, 2016 @ 10:32
    Shannon Deminick
    0

    No, these are just normal umbraco nodes, this routing has nothing to do with articulate.

    As an example, try creating a test document type and mimic the same structure to see if they route, like:

    • abc
      • news (custom doc type)
        • news (custom doc type)
  • Gordon Saxby 1461 posts 1883 karma points
    Jul 22, 2016 @ 10:55
    Gordon Saxby
    0

    We already have a content DocType, so I created this structure:

    /en/legal/legal-sub1/legal-sub2
    

    Each of those levels display OK (legal, legal-sub1 and legal-sub2)

    This installation of Articulate is using a custom theme, so could something in there be causing the issue? (I did install Articulate but didn't create the theme).

  • Shannon Deminick 1526 posts 5272 karma points MVP 3x
    Jul 22, 2016 @ 11:23
    Shannon Deminick
    0

    Yes but that's not the same test, those are all different names. The test you want to try is with the same names like you have with your articulate structure

    for example:

    /blah/news/news

    You can also test just changing the ArticulateArchive node back to it's original name of 'Archive' and see if that works.

  • Gordon Saxby 1461 posts 1883 karma points
    Jul 22, 2016 @ 11:54
    Gordon Saxby
    0

    OK - I changed the sub pages to both be called "News" so I have

    /en/legal/news/news/
    

    and those pages all work.

  • Shannon Deminick 1526 posts 5272 karma points MVP 3x
    Jul 25, 2016 @ 09:46
    Shannon Deminick
    0

    is it because you changed the name from 'archive' to 'news' but there's actually an umbracoUrlName property attached to that node which still says 'archive' - which means it will route to that name?

  • Gordon Saxby 1461 posts 1883 karma points
    Jul 25, 2016 @ 10:02
    Gordon Saxby
    0

    No, that field is empty.

    I have just looked at the site where I use Articulate on it's own - the path to a post is //site/archive/postname

    which works - but I have now noticed that the URL //site/archive returns page not found, which is the same problem as the /en/news/news/ problem with this current site.

    Things all work OK if you follow links, but if someone edits the URL they may get a 404.

    It would be nice if that didn't happen, but if it's just the way Articulate works, then we will live with it.

  • Shannon Deminick 1526 posts 5272 karma points MVP 3x
    Jul 25, 2016 @ 10:23
    Shannon Deminick
    0

    I'm nearly positive this is because of how Umbraco routing works. These pages are not being routed by articulate, they are being routed by Umbraco - i.e. These are just normal Umbraco pages.

    If you haven't assigned a domain name to your other root nodes, routing can become odd like this especially when there are duplicated names/paths between the 2 root/site trees.

  • Gordon Saxby 1461 posts 1883 karma points
    Jul 25, 2016 @ 10:29
    Gordon Saxby
    0

    Looking at your site, a URL to a post is

    http://shazwazza.com/post/asmx-soap-webservices-with-abstract-classes-without-using-xmlinclude/
    

    but this gives a 404

    http://shazwazza.com/post/
    

    Which is the issue I'm describing - I think.

  • Shannon Deminick 1526 posts 5272 karma points MVP 3x
    Jul 25, 2016 @ 10:39
    Shannon Deminick
    0

    Ok, in that case it's because it's an umbraco node that doesn't have a template - that node is just a container, it doesn't render anything.

Please Sign in or register to post replies

Write your reply to:

Draft