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.
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?
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
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.
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.
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.
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
<?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>
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:
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?
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
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
Hi! I have already set the hostnames for the top nodes.
This is the code in the umbracoSettings.config:
Patrik,
And what output do you get when using the umbdebugshowtrace=true querystring appended to the url?
/Dirk
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
Is there some solution??
I´ve done an errorpage with id 1291. (Another one is 1251) And my umbracoSettings.config looks like
It does not work.
If i change the code between errors tag to
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
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.
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...
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>
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>
Am having some issues with <errorPage> in a multilingual Website as well.
when typing non existing page the errorPage is not picking up. Somthing like domain.com/en/nonexisting.aspx
Hi Fuji
Have you setup hostnames with cultures specified on them?
/Jan
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.
Ok, did you try and recycle the app pool or just touch the web.config file afterwards? Sometimes it seems to be neccessary.
/Jan
Hmmmmm.....i need to recycle the app pool then... i only made changes to the web.config
Ok...I'm not sure what you mean? Did you touch the web.config file? That really should be enough :)
/Jan
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
Weird here is what i added to the umbracoSettings.config
The page is not showing up though
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.
Anybody have any insights on this? I'm really lost here...
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?
The same problem. Guys, have you found solution? Would appreciate much!
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
Why not use the MultiSitePageNotFoundHandler from uComponents : http://ucomponents.codeplex.com/wikipage?title=MultiSitePageNotFoundHandler&referringTitle=Documentation
Dave
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
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
Thanks to all of you, I'll give this a try tomorrow and see if anything good will happen with my 404.
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:
Here is part from umbracoSettings.config:
And here is a part from web.config:
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.
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
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.
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.
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...
is working on a reply...