Copied to clipboard

Flag this post as spam?

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


  • Fuji Kusaka 2202 posts 4219 karma points
    Nov 14, 2011 @ 06:39
    Fuji Kusaka
    0

    Error page in Multilingual website

    Hi all,

    I have some issues getting error 404 and error 500 page to display. The website has 2 culture that is EN & FR.

    I did make changes in the umbracoSettings.config such as

    <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>


    But still nothing is showing up when i type a fake non existing page.

    Any advise?

  • Fuji Kusaka 2202 posts 4219 karma points
    Nov 15, 2011 @ 10:22
    Fuji Kusaka
    0

    Can someone point out why the error page is not showing up when using a fake or non existing page?

     

    //fuji

  • MartinB 411 posts 512 karma points
    Nov 15, 2011 @ 10:29
    MartinB
    0

    Hi Fuji

    I'd recommend that you use uComponents to handle multilingual 404 handlers.You find it in the packages repository.

    See for another technical solution: http://our.umbraco.org/forum/developers/api-questions/18524-Making-a-class-to-handle-multiple-404-pages

    Best of luck.

  • Fuji Kusaka 2202 posts 4219 karma points
    Nov 15, 2011 @ 10:33
    Fuji Kusaka
    0

    Hi Martin,

    Thanks for the response, let me try this.

     

    //fuji

  • Lee Kelleher 3876 posts 14589 karma points MVP 9x admin c-trib
    Nov 15, 2011 @ 11:11
    Lee Kelleher
    0

    Hi Fuji,

    As Martin says, uComponents has one to handle multi-lingual sites... the MultiSitePageNotFoundHandler.

    Couple of prerequisites... you must have a hostname/language set to the root node and that node must have a property with the alias "umbracoPageNotFound" - which contains a nodeId.

    Rest of the instructions are over on the uComponents CodePlex website: http://ucomponents.codeplex.com/wikipage?title=MultiSitePageNotFoundHandler

    Cheers, Lee.

  • Fuji Kusaka 2202 posts 4219 karma points
    Nov 15, 2011 @ 11:23
    Fuji Kusaka
    0

    Hi Lee,

    Ive try using Ucomponents but doesnt work. Here is  my config file

    I have set my domain and Language on both root node which works well. In document type of my homepage as described i have a content picker with alias  umbracoPageNotFound.

    When i type the following which is a fake an non existing page i can get the errorPage to display.

    http://domain.com/en/toto.aspx

    <NotFoundHandlers>
        <notFound assembly="umbraco" type="SearchForAlias" />
        <notFound assembly="umbraco" type="SearchForTemplate"/>
             <notFound assembly="uComponents.Core" type="NotFoundHandlers.MultiSitePageNotFoundHandler" />
        <notFound assembly="umbraco" type="SearchForProfile"/>
            <notFound assembly="umbraco" type="handle404"/>
    </NotFoundHandlers>

     

    //fuji

  • Lee Kelleher 3876 posts 14589 karma points MVP 9x admin c-trib
    Nov 15, 2011 @ 11:27
    Lee Kelleher
    0

    Hi Fuji,

    Try appending "?umbDebugShowTrace=true" to the URL - see what the trace information says. There should be something useful next to the "notFoundHandler" messages.  If you wouldn't mind posting a snippet from there? (removing any sensitive info first).

    Cheers, Lee.

  • Fuji Kusaka 2202 posts 4219 karma points
    Nov 15, 2011 @ 11:41
    Fuji Kusaka
    0

    Still not getting much info

    http://domain.com/en/toto.aspx?umbDebugShowTrace=true

    404 - File or directory not found.

    The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

     

    Does it make a difference if i have a urlRewriting in my config?

    //fuji

  • Lee Kelleher 3876 posts 14589 karma points MVP 9x admin c-trib
    Nov 15, 2011 @ 11:45
    Lee Kelleher
    1

    Hi Fuji,

    This looks like IIS is still handling your 404 errors and not passing them over to Umbraco to handle.

    Take a read of this thread: http://our.umbraco.org/forum/using/ui-questions/8244-IIS7--404

    Ultimately, you'll need to add the following line to your Web.config, under the <system.webServer>:

    <httpErrors existingResponse="PassThrough" />

    Cheers, Lee.

  • Fuji Kusaka 2202 posts 4219 karma points
    Nov 15, 2011 @ 11:48
    Fuji Kusaka
    0

    Lee ive just set the IIS and this is the output

    No umbraco document matches the url 'http://domain.com/en/toto.aspx?umbDebugShowTrace=true'

    umbraco tried this to match it using this xpath query'/root/* [@urlName = "en"]/* [@urlName = "toto"]')

    This page can be replaced with a custom 404 page by adding the id of the umbraco document to show as 404 page in the /config/umbracoSettings.config file. Just add the id to the '/settings/content/errors/error404' element.

    For more information, visit information about custom 404 on the umbraco website.

    This page is intentionally left ugly ;-)

    Request Details

    Session Id: hw4hpgot2youidgdqw0dmsmz Request Type: GET
    Time of Request: 11/15/2011 3:46:02 PM Status Code: 404
    Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8)

    Trace Information

    CategoryMessageFrom First(s)From Last(s)
    aspx.page Begin PreInit    
    umbracoInit handling request 3.7296E-05 0.000037
    request handler current url '/en/toto.aspx' 0.000185168 0.000148
    umbracoRequestHandler xpath: '/root/* [@urlName = "en"]/* [@urlName = "toto"]' 0.000255728 0.000071
    umbracoRequestHandler Just before xPath query (False, '/root/* [@urlName = "en"]/* [@urlName = "toto"]') 0.000284768 0.000029
    umbracoRequestHandler pageXPathQueryStart: '/root' 0.000310112 0.000025
    notFoundHandler Trying NotFoundHandler 'umbraco.SearchForAlias'... 0.001116224 0.000806
    urlAlias 'en/toto' 0.001262064 0.000146
    notFoundHandler Trying NotFoundHandler 'umbraco.SearchForTemplate'... 0.00454296 0.003281
    umbracoRequestHandler xpath: '/root/* [@urlName = "en"]' 0.004726096 0.000183
    notFoundHandler Trying NotFoundHandler 'umbraco.SearchForProfile'... 0.004787712 0.000062
    notFoundHandler Trying NotFoundHandler 'uComponents.Core.NotFoundHandlers.MultiSitePageNotFoundHandler'... 0.004872384 0.000085
    notFoundHandler Trying NotFoundHandler 'umbraco.handle404'... 0.00496232 0.000090
    umbracoRequestHandler After xPath query 0.005489904 0.000528
    umbracoRequestHandler Access checking started 0.005528448 0.000039
    umbracoRequestHandler Access checking ended 0.005564848 0.000036
    umbracoInit Done handling request 0.005592608 0.000028
    umbracoPage Looking up skin information 0.005648576 0.000056
    aspx.page End PreInit 0.005738208 0.000090
    aspx.page Begin Init 0.005766976 0.000029
    aspx.page End Init 0.005845088 0.000078
    aspx.page Begin InitComplete 0.005872416 0.000027
    aspx.page End InitComplete 0.005900432 0.000028
    aspx.page Begin PreLoad 0.0059244 0.000024
    aspx.page End PreLoad 0.005948608 0.000024
    aspx.page Begin Load 0.005972224 0.000024
    aspx.page End Load 0.006010224 0.000038
    aspx.page Begin LoadComplete 0.006035344 0.000025
    aspx.page End LoadComplete 0.00606 0.000025
    aspx.page Begin PreRender 0.006083664 0.000024
    aspx.page End PreRender 0.0061088 0.000025
    aspx.page Begin PreRenderComplete 0.00613664 0.000028
    aspx.page End PreRenderComplete 0.006162976 0.000026
    aspx.page Begin SaveState 0.006223664 0.000061
    aspx.page End SaveState 0.006249952 0.000026
    aspx.page Begin SaveStateComplete 0.006274 0.000024
    aspx.page End SaveStateComplete 0.006298192 0.000024
    aspx.page Begin Render 0.006321856 0.000024
    aspx.page End Render
  • Fuji Kusaka 2202 posts 4219 karma points
    Nov 15, 2011 @ 11:53
    Fuji Kusaka
    0

    This brings me to a error 500 message. I have just set my IIS but can paste the trace info in the RTE.

  • Lee Kelleher 3876 posts 14589 karma points MVP 9x admin c-trib
    Nov 15, 2011 @ 11:57
    Lee Kelleher
    0

    ... and "domain.com" is definitely associated with a node that contains the "umbracoPageNotFound" property? (and has a value for it?)

    I'm taking a look at the code (in uComponents), this will only work for associated domain/hostnames ... it's not going to work with sub-folders (it wasn't designed for that).

    Try swapping the NotFoundHandler over to the "SearchForPageNotFound" instead.  This one should work for you.  It tries to find the 'nearest' node that has the "umbracoPageNotFound" property.

    Cheers, Lee.

  • Fuji Kusaka 2202 posts 4219 karma points
    Nov 15, 2011 @ 12:16
    Fuji Kusaka
    0

    Yes i try to output the value of "umbracoPageNotFound" and display the right value 2623

    I also changed my 404handlers.config to

     

    <notFound assembly="umbraco" type="SearchForAlias" />
    <notFound assembly="umbraco" type="SearchForTemplate"/>
    <notFound assembly="uComponents.Core" type="NotFoundHandlers.MultiSitePageNotFoundHandler" />
    <notFound assembly="uComponents.Core" type="NotFoundHandlers.SearchForPageNotFound" />
         <notFound assembly="umbraco" type="SearchForProfile"/>
          <notFound assembly="umbraco" type="handle404"/>

     

    Still not working

     

    No umbraco document matches the url 'http://domain.eservices-host.com/en/toto.aspx'

    umbraco tried this to match it using this xpath query'/root/* [@urlName = "en"]/* [@urlName = "toto"]')

    This page can be replaced with a custom 404 page by adding the id of the umbraco document to show as 404 page in the /config/umbracoSettings.config file. Just add the id to the '/settings/content/errors/error404' element.

    For more information, visit information about custom 404 on the umbraco website.

     

  • Lee Kelleher 3876 posts 14589 karma points MVP 9x admin c-trib
    Nov 15, 2011 @ 12:28
    Lee Kelleher
    0

    Try rearranging the config to this:

    <notFound assembly="umbraco" type="SearchForAlias" />
    <notFound assembly="umbraco" type="SearchForTemplate"/>
    <notFound assembly="umbraco" type="SearchForProfile"/>
    <notFound assembly="uComponents.Core" type="NotFoundHandlers.SearchForPageNotFound" />
    <notFound assembly="umbraco" type="handle404"/>

    Not sure if that will resolve the issue, but does put them in the "right" order.

    Try the "?umbDebugShowTrace=true" again, see what happens this time.

    Quick check, are you using uComponents v3.0 (or v2.2 beta 3)?

  • Fuji Kusaka 2202 posts 4219 karma points
    Nov 15, 2011 @ 12:39
    Fuji Kusaka
    0

    uComponents V2.2. 

    Btw so i keep those settings ? 

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

     

     

     

  • Fuji Kusaka 2202 posts 4219 karma points
    Nov 15, 2011 @ 12:42
    Fuji Kusaka
    0

    Same message when reordering 

    No umbraco document matches the url 'http://domain.com/en/toto.aspx?umbDebugShowTrace=true'

    umbraco tried this to match it using this xpath query'/root/* [@urlName = "en"]/* [@urlName = "toto"]')

    This page can be replaced with a custom 404 page by adding the id of the umbraco document to show as 404 page in the /config/umbracoSettings.config file. Just add the id to the '/settings/content/errors/error404' element.

    For more information, visit information about custom 404 on the umbraco website.

  • Fuji Kusaka 2202 posts 4219 karma points
    Nov 15, 2011 @ 12:57
    Fuji Kusaka
    0

    Ok i managed to get it working but this time its not picking the culture info.

    http://domain.com/en/toto.aspx is working fine an redirecting to the english error.aspx

    http://domain.com/fr/toto.aspx for FR is redirecting to the english "error.aspx" instead of "erreur.aspx".

    //fuji

  • Fuji Kusaka 2202 posts 4219 karma points
    Nov 15, 2011 @ 13:03
    Fuji Kusaka
    0

    Any idea why only the default value is being taken into consideration while the culture infos not?

    <errorPage culture="default">2623</errorPage>
  • Lee Kelleher 3876 posts 14589 karma points MVP 9x admin c-trib
    Nov 15, 2011 @ 13:05
    Lee Kelleher
    0

    Not sure about whether to keep the <error404> settings, I believe they are only used by the handle404 code.

    Don't know what else to suggest, difficult to know how you've got your root/homepage nodes set-up for each language.

    - Lee

  • Fuji Kusaka 2202 posts 4219 karma points
    Nov 15, 2011 @ 13:11
    Fuji Kusaka
    0

    I have the following structure.

    Content

    *en (root of http://domain.com/en)
    -Link 1
    --sub link 1
    -Link 2  
    --sub link 2 
    *fr (root of http://domain.com/fr)
    -Link 1
    --sub link 1
    -Link 2  
    --sub link 2 
  • MartinB 411 posts 512 karma points
    Nov 15, 2011 @ 16:10
    MartinB
    0

    I think i had some issues with the setup of uComponents as well. Perhaps the post is in the bug report section of uComponents.

    As i recall it, it was a fairly simple thing that caused all the trouble.

  • Lee Kelleher 3876 posts 14589 karma points MVP 9x admin c-trib
    Nov 15, 2011 @ 16:14
    Lee Kelleher
    0

    Yes, definitely report bugs for uComponents ... only problem here is that I'd be the one fixing this particular bug and don't have enough info to reproduce the issue :-$

  • Fuji Kusaka 2202 posts 4219 karma points
    Nov 16, 2011 @ 06:55
    Fuji Kusaka
    0

    Do you think i should upgrade to v3.0?

  • Lee Kelleher 3876 posts 14589 karma points MVP 9x admin c-trib
    Nov 16, 2011 @ 10:32
    Lee Kelleher
    0

    v3.0 is essentially v2.2 final/stable (we bumped up the version number as too many people thought the v2.2 beta was a milestone release).

    Not sure if the code for the NotFoundHandlers had changed much since the v2.2 beta ... but yes, it's worth a try.

    Cheers, Lee.

  • MartinB 411 posts 512 karma points
    Dec 16, 2011 @ 13:43
    MartinB
    0

    @Lee

    I meant that my post might be in there, not that he should make his own ;-) Cheers!

  • djscorch 67 posts 106 karma points
    Jan 17, 2012 @ 16:57
    djscorch
    0

     

    <error500>
       
    <errorPageculture="default">2623</errorPage>
       
    <errorPageculture="en-US">2623</errorPage>
       
    <errorPageculture="fr-FR">2624</errorPage>
    </error500>
    Is this valid?

     

Please Sign in or register to post replies

Write your reply to:

Draft