Copied to clipboard

Flag this post as spam?

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


  • lonehorseend 24 posts 71 karma points
    Feb 27, 2015 @ 21:40
    lonehorseend
    0

    404 Showing Right Content, Identifying itself as wrong node

    I have followed this:

    https://our.umbraco.org/wiki/install-and-setup/configuring-404-pages, even doing the part httpErrors Passthrough and setting the "trySkipIisCustomErrors" to true. My error configuration is like this:

    <errors>
          <error404>1245</error404>
          <!--
            <error404>
                <errorPage culture="default">1</errorPage>
                <errorPage culture="en-US">200</errorPage>
            </error404>
           -->      
        </errors>

    It shows what I expect, but because it defaults to my home page Node.Id instead of the 1245 Node.Id, the formatting is all messed up. This is for Umbraco 7.1.8. 

  • lonehorseend 24 posts 71 karma points
    Feb 28, 2015 @ 00:23
    lonehorseend
    0

    Upgrading to 7.2.1 didn't help

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 28, 2015 @ 07:20
    Jan Skovgaard
    0

    Hi there

    Hmm, I'm not sure I get what is happening.

    You have setup the 404 page with the nodeid of 1245...but when you hit a page that does not exist you see the frontpage instead? And how is the styling messed up? Could you share a screendump?

    What server are you using? Is it IIS 7 or 8 8 or?

    /Jan

  • lonehorseend 24 posts 71 karma points
    Feb 28, 2015 @ 07:53
    lonehorseend
    0

    IIS7.5.  

    It's actually failing on sitemap, which is a variation of a known and vialable page, site-map, and just happens to be the 404 page we want to use. It's doing is the proper content, but not the proper format because I have it checking for the node.id to determine the body class and since it's returning the node id of the home page instead of the site mape, it's setting the body class as front instead of secondary.

    Unfortunately, I can't do a screen dump because the site is still in development.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 28, 2015 @ 08:03
    Jan Skovgaard
    0

    Ok

    So it's actually working but it's due to the wrong class name being set.

    Is the sitemap based on an alternative template? Or is it based on a custom document type called "Sitemap" ?

    /Jan

  • lonehorseend 24 posts 71 karma points
    Feb 28, 2015 @ 09:08
    lonehorseend
    0

    Content type is Content. Template is Sitemap, which is the Sitemap.cshtml file under the views directory.

    What is interesting is I can put the same url of /sitemap in a Umbraco 6 site and it doesn't have the problem. It goes to the site-map page like it's supposed to with the proper formatting and proper node.Id.

     

Please Sign in or register to post replies

Write your reply to:

Draft