I'm working on a multilangual website running on Umbraco 4.7. Each of the languages runs under its own subfolder, which is working fine until I get a 404 error. For some reason it does not use the current culture's error page, but jumps straight to the default one.
The hostnames for the folders are set to "domainSV" and "domainEN". I've tried setting them to domain.com/sv/ and domain.com/en/, but that does not seem to solve my problem.
Most of the solutions I've seen so far involves changing the source code, which I'd prefer not to. Are there any way to solve this without making any big changes?
Tried commenting out the default culture which made the error page turn into the default Umbraco one. It's as if Umbraco doesn't recognize the culture at all.
When I tried to apply the solution from SO, I got a 500 error:
System.ApplicationException: The current httpContext can only be set once during a request. at Umbraco.Web.UmbracoContext.set_Current(UmbracoContext value) at Umbraco.Web.UmbracoContext.EnsureContext(HttpContextBase httpContext, ApplicationContext applicationContext, Boolean replaceContext) at Umbraco.Web.UmbracoModule.BeginRequest(HttpContextBase httpContext) at Umbraco.Web.UmbracoModule.<Init>b__6(Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Actually, sorry for the previous post. The error was something else. However, I'm still getting the same page (english). So, the solution didn't break the site, but didn't fix the issue either.
Always default 404 page on multilangual site
Hello,
I'm working on a multilangual website running on Umbraco 4.7. Each of the languages runs under its own subfolder, which is working fine until I get a 404 error. For some reason it does not use the current culture's error page, but jumps straight to the default one.
The hostnames for the folders are set to "domainSV" and "domainEN". I've tried setting them to domain.com/sv/ and domain.com/en/, but that does not seem to solve my problem.
Most of the solutions I've seen so far involves changing the source code, which I'd prefer not to. Are there any way to solve this without making any big changes?
umbracoSettings.config
<errors> <error404> <errorPage culture="default">1242</errorPage> <errorPage culture="sv-SE">1242</errorPage> <errorPage culture="en-US">1240</errorPage> </error404> </errors>
Request trace
Hi Alexander
What happens if you simply uncomment the default culture?
/Jan
Tried commenting out the default culture which made the error page turn into the default Umbraco one. It's as if Umbraco doesn't recognize the culture at all.
Shameless bump.
Hi Alexander
Ok, seems like Umbraco is not being allowed to handle the 404 requests.
Try adding this to your web.config file:
This should make Umbraco handle the non-existing .aspx pages.
You can read Sebastiaans explanation here for further details: http://stackoverflow.com/questions/4471683/setting-errorpage-in-umbraco/4471924#4471924
Hope this helps.
/Jan
Hello all.
Sorry for hijacking this thread, but I have the exact same situation in an Umbraco v6 installation.
In particular, I have the following in web.config under system.webserver:
If anyone else is having the same problem, i solved it (a year later) using a solution from stackoverflow.
http://stackoverflow.com/questions/6929304/add-custom-404-pages-in-umbraco-4-7?rq=1
Unfortunately, no.
When I tried to apply the solution from SO, I got a 500 error:
I'm really baffled by this...
Actually, sorry for the previous post. The error was something else. However, I'm still getting the same page (english). So, the solution didn't break the site, but didn't fix the issue either.
is working on a reply...