Copied to clipboard

Flag this post as spam?

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


  • Anthony Candaele 1197 posts 2049 karma points
    Mar 03, 2013 @ 14:12
    Anthony Candaele
    0

    custom404 not working properly in multilanguage website

    Hi,

    I have a multilanguage website consisting of two country node (Israel, Japan) and each country node has several different language nodes. For instance the Israel country node has 3 languae nodes: Hebrew, English and Arabic.

    In the backoffice, this looks like this:

    for each language node I created a custom 404 page. This for instance is the custom 404 node for the Hebrew language:

    In the umbracoSettings.config, I added these settings for my three cusom 404 pages:

     

    <errors>

          <!-- the id of the page that should be shown if the page is not found -->

            <error404>             

                 <errorPage culture="default">1725</errorPage>

                 <errorPage culture="ar-LB">1738</errorPage>

                 <errorPage culture="he-IL">1735</errorPage>

                  <errorPage culture="en-US">1725</errorPage>              

          </error404>      

        </errors>

     

    Now here's the problem. When I enter a non-existing page in the browser, I always get the Hebrew custom 404 page. For instance when I enter "http://localhost/en/nonexsingpage" I get the Hebrew custom 404 page and not the English custom 404 page. When I enter http://localhost/ar/nonexistingpage I also get the Hebrew custom 404 page and not the Arabic custom 404 page.

    Does someone knows why I always get the Hebrew custom 404 page, and not the other versions of custom 404 page.

    Thanks for your help,

    Anthony

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 03, 2013 @ 17:04
    Jan Skovgaard
    1

    Hi Anthony

    This seems to be a source to great frustration. I've seen this before and must admit that I can't remember how we got i solved.

    But something I have noticed is that sometimes it's required to recycle the app pool after setting up the error pages in the umbracoSettings.config - did you do that?

    What version of IIS are you using?

    /Jan

  • Anthony Candaele 1197 posts 2049 karma points
    Mar 03, 2013 @ 19:49
    Anthony Candaele
    0

    Hi Jan,

    I recycled the App_Pool, but no luck.

    I'm using IIS 7.5

    I also add the setting:

    <httpErrors existingResponse="PassThrough" />

    in web.config

    Thanks for your help,

    Anthony

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 03, 2013 @ 22:12
    Jan Skovgaard
    0

    Hi Anthony

    In the site where I know we had this problem we're not using the PassThrough stuff it seems.

    Our httpErrors section look like this

     <httpErrors errorMode="Custom">

     <remove statusCode="404" subStatusCode="-1" />

     <error statusCode="404" prefixLanguageFilePath="" path="/system/page-not-found.aspx" responseMode="ExecuteURL" />

     </httpErrors>

    Try setting the path to a page that does not exist and see what happens - the above page we refer does not exist in or outside of Umbraco.

    /Jan

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 04, 2013 @ 22:11
    Jan Skovgaard
    0

    Hi Anthony

    Did you get any further with this issue?

    /Jan

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Mar 05, 2013 @ 00:32
    Alex Skrypnyk
    101

    Hi everybody,

    We solved this issue via adding custom module that processes the errors and do redirect to the required page.

    I think it's better than setting the path in the web.config. 

    Thanks,

    Alex

  • Anthony Candaele 1197 posts 2049 karma points
    Mar 09, 2013 @ 11:41
    Anthony Candaele
    1

    Hi Jan,

    Sorry for my late answer, been away a couple of days. To answer to your question, no, I wasn't able to solve this issue.

    For some reason it's always the hebrew custom 404 page that shows up, even if I'm on the English content pages.

    My settings in the umbracoSettings.config file look like this:

     

                       1

                       1749

                       1740

         

    Removing the HttpErrors setting in the web.config : didn't solve the case either.

    I think I'll have to follow Alex' suggestion and implement a custom 404 handler.

    I did this once for a website using the code that was provided by Sander:

    http://stackoverflow.com/questions/6929304/add-custom-404-pages-in-umbraco-4-7

    I've implemented this custom 404 handler, and it worked fine.

    People interested in this solution might also be interested in how to implement your own 404 handler .

    greetings,

    Anthony

Please Sign in or register to post replies

Write your reply to:

Draft