Copied to clipboard

Flag this post as spam?

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


  • Patrik Wibron 40 posts 67 karma points
    Sep 01, 2009 @ 10:33
    Patrik Wibron
    1

    Custom 404-pages on a multilingual site doesn't work

    Hi!
    I'm working on a site with different languages and I want to make one 404-page for each language. I've already created templates, dictionary items and so on. The problem is that I can't get the whole thing work.

    I Googled and found a forum-topic about using <errorPage culture="en-US">(nodeID)</errorPage> in the umbracoSettings config. But this doesn't work, i get this standard 404-page from umbraco instead. I've tried the "en-US" and "sv-SE" language-codes, but none work.

    What am I doing wrong?

    Regards

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 01, 2009 @ 10:47
    Dirk De Grave
    1

    Hi Patrik,

    can you paste that part of the config file? It should look as in:

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

    Have you set the hostnames on top level nodes?

    Do you have other 'not found handlers' registered as well? I think those are processed in order in which they're specified.

    Cheers,

    /Dirk

  • Patrik Wibron 40 posts 67 karma points
    Sep 01, 2009 @ 10:55
    Patrik Wibron
    1

    Hi! I have already set the hostnames for the top nodes.

    This is the code in the umbracoSettings.config:

     <errors>
    <errorPage culture="default">1</errorPage>
    <errorPage culture="en-US">2279</errorPage>
    <errorPage culture="sv-SE">2226</errorPage>
    </errors>
  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 01, 2009 @ 10:59
    Dirk De Grave
    1

    Patrik,

    And what output do you get when using the umbdebugshowtrace=true querystring appended to the url? 

    /Dirk

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Sep 01, 2009 @ 11:06
    Peter Dijksterhuis
    1

    It might be related to the culture, not sure here though.

    The sv-SE is not the only option for swedish language, I think the other one is se-SE (not sure). What happens if you add that last one to the config-file as well?

    Peter 

  • Santtu1980 24 posts 31 karma points
    Sep 08, 2009 @ 10:16
    Santtu1980
    1

    Is there some solution??

    I´ve done an errorpage with id 1291. (Another one is 1251) And my umbracoSettings.config looks like

        <errors>
          <!-- the id of the page that should be shown if the page is not found -->
          <errorPage culture="default">1291</errorPage>
          <errorPage culture="fi-FI">1291</errorPage>
          <errorPage culture="en-US">1251</errorPage>
        </errors>

    It does not work. 
    If i change the code between errors tag to

    <error404>1291</error404>

    The page id 1291 opens correctly.

    Using umbraco 4.0.2.1 and havent done changes to 404handlers.config or anywhere else related to 404 errors and want to use culturedepending errorpages

  • Len Dierickx 150 posts 92 karma points
    Sep 08, 2009 @ 10:25
    Len Dierickx
    1

    Hi,

    We have a different solution, and we created our own handler.

    Each website contains a 404 page, with a specific doc type, and a specific name. Our handler searches for that node in the website tree, and displays the 404 page with language specific content.

    If the handler cannot find the 404 node inside the website, then the Umbraco handler will kick in and provide the basic 404 page.

    If you need any code, please ask but I do not have a generic solution.

    thx, Len. 

     

  • Santtu1980 24 posts 31 karma points
    Sep 08, 2009 @ 10:44
    Santtu1980
    1

    Ok. thx for your fast reply. I did found one codesample for Not found handlers from umbraco books http://umbraco.org/documentation/books/not-found-handlers so i´ll examine that one...

  • Harry Kakoulidis 17 posts 40 karma points
    Mar 25, 2011 @ 06:31
    Harry Kakoulidis
    0

    I have this problem also using v 4.7.0.

    These are ignored completely:

                <errorPage culture="default">2552</errorPage>
                <errorPage culture="el-GR">2340</errorPage>
                <errorPage culture="ru-RU">2551</errorPage>

    Only this works:

    <error404>2340</error404>

  • Harry Kakoulidis 17 posts 40 karma points
    Mar 31, 2011 @ 21:47
    Harry Kakoulidis
    3

    OK, I found the solution, it needs to be wrapped into a error404 node.

      <errors>
          <error404>
            <errorPage culture="default">1773</errorPage>
            <errorPage culture="en-US">1774</errorPage>
            <errorPage culture="de-DE">1773</errorPage>
          </error404>
        </errors>

  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 11, 2011 @ 14:25
    Fuji Kusaka
    0

    Am having some issues with <errorPage> in a multilingual Website as well.

    <errors>           
                <error404>
                     <errorPage culture="default">2623</errorPage>
                     <errorPage culture="en-US">2624</errorPage>
                     <errorPage culture="fr-FR">2624</errorPage>
             </error404>
    </errors>

    when typing non existing page the errorPage is not picking up.  Somthing like domain.com/en/nonexisting.aspx

     

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 11, 2011 @ 17:54
    Jan Skovgaard
    0

    Hi Fuji

    Have you setup hostnames with cultures specified on them?

    /Jan

  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 11, 2011 @ 18:10
    Fuji Kusaka
    0

    Hi Jan,

    Yes  i did setup the hostname and the dictionary items working fine but its only the 404 errorPages that i cant get working.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 11, 2011 @ 18:14
    Jan Skovgaard
    0

    Ok, did you try and recycle the app pool or just touch the web.config file afterwards? Sometimes it seems to be neccessary.

    /Jan

  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 12, 2011 @ 17:20
    Fuji Kusaka
    0

    Hmmmmm.....i need to recycle the app pool then... i only made changes to the web.config

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 12, 2011 @ 23:34
    Jan Skovgaard
    0

    Ok...I'm not sure what you mean? Did you touch the web.config file? That really should be enough :)

    /Jan

  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 13, 2011 @ 10:47
    Fuji Kusaka
    0

    Yes i did make some changes to the umbracoSettings.config but its not showing the error page when i type a no existing page.

    Instead i get "404 - File or directory not found." msg

  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 13, 2011 @ 10:54
    Fuji Kusaka
    0

    Weird here is what i added to the umbracoSettings.config

    <errors>        
                <error404>
                      <errorPage culture="default">2623</errorPage>
                     <errorPage culture="en-US">2624</errorPage>
                     <errorPage culture="fr-FR">2624</errorPage>
             </error404>
             <error500>
                      <errorPage culture="default">2623</errorPage>
                     <errorPage culture="en-US">2624</errorPage>
                     <errorPage culture="fr-FR">2624</errorPage>
             </error500>
    </errors>

    The page is not showing up though

  • Jan Vermeerbergen 79 posts 112 karma points
    Aug 16, 2012 @ 14:17
    Jan Vermeerbergen
    0

    Fuji, did you get this to work? I'm having a similar problem. I have a website with 4 languages, each with their own 404 page. Something like domain.com/de/errors/404, domain.com/en/errors/404, ....

    Here's my setup in umbracoSettings.config:
        <errors>
          <error404>        
            <errorPage culture="nl-BE">1089</errorPage>
            <errorPage culture="en-GB">1435</errorPage>
            <errorPage culture="de-DE">1444</errorPage>
            <errorPage culture="fr-BE">1426</errorPage>        
          </error404>
        </errors> 

    Whenever I open a non-existing page, I get the "intentionaly left ugly" "page not found"-page.  

    Whenever I include <errorPage culture="default">1089</errorPage>, all non-existing pages link to this page.

    My Web.config looks like this:
            <httpErrors>
                <remove statusCode="404" subStatusCode="-1" />
                <error statusCode="404" prefixLanguageFilePath="" path="/errors/404" responseMode="ExecuteURL" />
            </httpErrors>  

    In my IIS Error Pages pane, I have this:
    Status code: 404
    Path: /errors/404
    Type: Execute URL 
    Entry Type: Local

     

    I'm at my wit's end here..... Any help would be greatly appreciated. 

  • Jan Vermeerbergen 79 posts 112 karma points
    Aug 27, 2012 @ 11:04
    Jan Vermeerbergen
    0

    Anybody have any insights on this? I'm really lost here...

  • DT 4 posts 24 karma points
    Sep 16, 2012 @ 19:40
    DT
    0

    I have exactly the same problem as Jan.

    Here's my setup in umbracoSettings.config:

    <error404>

            <error Page culture="default">1213</errorPage>

            <errorPage culture="da-DK">1213</errorPage>

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

    <error404> 

    When I go to www.domain.dk/da/pagenotexist, the english error page version shows up instead of the danish error page.

    Any ideas?

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

    The same problem. Guys, have you found solution? Would appreciate much!

  • Fuji Kusaka 2203 posts 4220 karma points
    Apr 12, 2013 @ 06:35
    Fuji Kusaka
    0

    Hi,

    Well i did solved this issue by making a custom usercontrol instead. I will add it as a package for some of you who might find this useful

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Apr 12, 2013 @ 10:10
    Dave Woestenborghs
    0

    Why not use the MultiSitePageNotFoundHandler from uComponents : http://ucomponents.codeplex.com/wikipage?title=MultiSitePageNotFoundHandler&referringTitle=Documentation

    Dave

  • Pasang Tamang 258 posts 458 karma points
    Apr 12, 2013 @ 10:41
    Pasang Tamang
    1

    I agreed with Dave. uComponents MultiSitePageNotFoundHandler should work. I am using same in my umbraco sites. Just you need to add umbracoPageNotFound  property alias in top level node of that site.

    PTamang

  • SM 19 posts 41 karma points
    Apr 24, 2013 @ 14:14
    SM
    0

    In order to work error pages in different cultures in Multilingual websites add the following in the web config to enable passthrough of errors to umbraco

    <system.webServer>
     <httpErrors existingResponse="PassThrough"/>
    <
    system.webServer>
  • Ilya 18 posts 53 karma points
    Apr 25, 2013 @ 22:51
    Ilya
    0

    Thanks to all of you, I'll give this a try tomorrow and see if anything good will happen with my 404.

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

    Well, I spend some hours trying to attach MultiSitePageNotFoundHandler to my multilingual site, but still no success.

    I'll post the details below, would appreciate much if someone helps.

     

    Here is my 404handlers.config:

    <?xml version="1.0" encoding="utf-8"?>
    <NotFoundHandlers>
    <notFound assembly="umbraco" type="SearchForAlias" />
    <notFound assembly="umbraco" type="SearchForTemplate" />
    <notFound assembly="umbraco" type="SearchForProfile" />
    <notFound assembly="uComponents.NotFoundHandlers" type="MultiSitePageNotFoundHandler" />
    <notFound assembly="umbraco" type="handle404" />
    </NotFoundHandlers>

     

    Here is part from umbracoSettings.config:


    <?xml version="1.0" encoding="utf-8" ?>
    <settings>
    <content>
       ...
        <errors>
    <!-- the id of the page that should be shown if the page is not found -->
    <!-- <error404>1</error404>-->
    </errors>
    </content>   ...
    <requestHandler>
    <!-- this will ensure that urls are unique when running with multiple root nodes -->
    <useDomainPrefixes>true</useDomainPrefixes>
    <!-- this will add a trailing slash (/) to urls when in directory url mode -->
    <addTrailingSlash>true</addTrailingSlash>
       ...
      </requestHandler>
    </settings>

     

    And here is a part from web.config:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
        ...
    <system.web>
    <!-- <customErrors mode="On" defaultRedirect="~/umbraco/plugins/poetpatcher/CustomError.aspx" redirectMode="ResponseRewrite" />-->
    <customErrors mode="On" redirectMode="ResponseRewrite" />
    <trace enabled="true" requestLimit="100" pageOutput="true" traceMode="SortByTime" localOnly="false" />
        ...
     </system.web>
      ...
    <system.webServer>
        ...
    <httpErrors existingResponse="PassThrough"/>
    </system.webServer>
      
    </configuration>

    The site has a main root and 3 language mainpages (I mean somesite.com -> /ru, /en, /de -> all other pages in these 3 languages). For sure - all language mainpages are made as subdomains with different cultures and I've created an umbracoPageNotFound property for each (with different error pages set). 

    Anyway, still can't get this to work. Getting something like this on my local dev machine:

    http://oi44.tinypic.com/p8576.jpg

     

    Any ideas? Thanks for your attention, anyway.




  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    May 01, 2013 @ 10:11
    Dave Woestenborghs
    0

    Hi Ilya,

    Did you set up a property umbracoPageNotFound on your root node ? See the uComponentes documentation for this

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

    Dave

  • Ilya 18 posts 53 karma points
    May 01, 2013 @ 12:18
    Ilya
    0

    Hi, Dave.

    I've set up this property for all subroots (which are set as subdomains for different language versions, I mean: domain.com/ru, domain.com/en, etc.). That is because I would like different 404 pages for different language versions of my site.

    For the main root (which is domain.com) I did not create this property. Do you think, that is the problem?

    Ilya. 

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    May 01, 2013 @ 12:28
    Dave Woestenborghs
    0

    Hi Ilya,

    I think that is the problem. The uComponents handler will only look for the property on root level nodes. So the node right below the content folder.

    It's not so difficult to change the handler to look at other nodes.

  • Ilya 18 posts 53 karma points
    May 03, 2013 @ 19:02
    Ilya
    0

    Hi, Dave.

    Looks like there are also some problems with my configs.

    I've tested your solution: created a property for the root level node and set it with some error page, just to test if it would work.

    But it didn't. The same result - "blablabla... this page has been left ugly ;)".

    So, looks like I still have to modify something in .config files...

Please Sign in or register to post replies

Write your reply to:

Draft