Copied to clipboard

Flag this post as spam?

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


  • Thor Madsen-Holm 82 posts 212 karma points c-trib
    Sep 05, 2012 @ 10:25
    Thor Madsen-Holm
    0

    Yet another post about problems with multiple 404 errorpages

    Hi, 

    I am having some trouble setting up multiple 404 pages on a site with 6 different languages. 
    I have done this before without having any problems, but this solution must differ from that since the setup is virtually identical, the only thing that differs is this <add key="umbracoHideTopLevelNodeFromPath" value="false" /> which is set to false on the site I am having problems with.

    Here is what I have done so far.
    In the umbraco.settings file I have added this:

    <errors>
      <error404>
          <errorPage culture="en-GB">11227</errorPage>
       <errorPage culture="fr-FR">11202</errorPage>
       <errorPage culture="zh-CHS">5060</errorPage>
       <errorPage culture="de-DE">3740</errorPage>
       <errorPage culture="es-ES">4644</errorPage>
       <errorPage culture="pt-PT">4192</errorPage>
      </error404>
    </errors>

    As far as i know this should be enough for it to work. 

    In my local dev setup I have added to sites to the host file like this: site.dk.local, site.en.local etc. 
    In Umbraco I have set these hostnames on each individual site along with the culture. 
    So the cultures should also be set (and are different on every site).

    I found some other posts that suggested that I added <httpErrors existingResponse="PassThrough" /> to the web.config, but that did not solve anything. No matter what I get the standard error page.

    Can anyone see what I am missing? 
    Any help will be much appreciated.

    /Thor

  • Anders Stentebjerg 58 posts 234 karma points
    Sep 05, 2012 @ 11:01
    Anders Stentebjerg
    0

    Hi Thor,
    Which version of Umbraco are you running?

    -A-

  • Thor Madsen-Holm 82 posts 212 karma points c-trib
    Sep 05, 2012 @ 11:03
    Thor Madsen-Holm
    0

    Hi Anders,

    I'm running 4.7.1.1 

  • Matt Bliss 176 posts 234 karma points c-trib
    Sep 05, 2012 @ 11:37
    Matt Bliss
    0

    Thor,

    Can I suggest an alternative approach, what about using the uComponents Multi-site Page Not Found?

    http://ucomponents.codeplex.com/wikipage?title=MultiSitePageNotFoundHandler&referringTitle=Documentation

    You won't need to hard code node Id's in a config file that way either.

    Matt

     

     

     

     

  • Thor Madsen-Holm 82 posts 212 karma points c-trib
    Sep 05, 2012 @ 11:45
    Thor Madsen-Holm
    0

    Hi Matthew, 

    Thank you for your reply. 

    I thought about that aswell, however I read somewhere that this approach only works if every site has different hostnames which is not the case on this site where its a combination of different hostnames and site.local/en/, site.local/fr/ - which is why I have set umbracoHideTopLevelNodeFromPath to false. 

    /Thor
     

  • Matt Bliss 176 posts 234 karma points c-trib
    Sep 05, 2012 @ 12:29
    Matt Bliss
    0

    Hi Thor,

    In that case two things to check:

    1) Check the order / contents of the /config/404handlers.config file to ensure that the correct handler is getting the 404 errors to process.

    2) I'm not sure that the nesting in your /config/umbracoSettings.config is correct:

            <errors>
                <!-- the id of the page that should be shown if the page is not found -->
                <!--        <errorPage culture="default">1</errorPage>-->
                <!--        <errorPage culture="en-US">200</errorPage>-->
                <error404>1</error404>
            </errors>

    Hope that helps,

    Matt

  • Thor Madsen-Holm 82 posts 212 karma points c-trib
    Sep 05, 2012 @ 13:06
    Thor Madsen-Holm
    0

    Hi Matthew, 

    I tried that aswell, but nesting that way only works if you have 1 site, not multiple.

    /Thor  

  • Matt Bliss 176 posts 234 karma points c-trib
    Sep 05, 2012 @ 15:08
    Matt Bliss
    0

    So you've tried the <errorPage culture=... nodes directly under the <errors> node without the <error404> in between?

  • Thor Madsen-Holm 82 posts 212 karma points c-trib
    Sep 05, 2012 @ 15:43
    Thor Madsen-Holm
    0

    Yep i tried that aswell, still no luck. 

    /Thor 

  • Ilya 18 posts 53 karma points
    Apr 11, 2013 @ 22:13
    Ilya
    0

    Thor, have you found a solution? I'm having the same problem, and no idea why it happens so.

Please Sign in or register to post replies

Write your reply to:

Draft