Umbraco 404 with a different culture does not work

My problem is actually close to this: the Umbraco V6 404 is not properly handled according to the culture

I have 2 catalogs with different cultures:

Content EN page1 page2 404 FR page1 404 

When I go from the FR page to 404, the culture returns to English.

It is similar to url-based and, possibly, since 404, the engine cannot find the link, so it sets the culture as the default, but I would like to maintain this culture when the user encounters a 404 page.

my config:

  <error404> <errorPage culture="en-US">1187</errorPage> <errorPage culture="fr-FR">1189</errorPage> </error404> 

How can i do this?

I use a sibling path in domains.

Example URL:

  • site / en / page1
  • website / o / p. 2
  • website / Fri / p. 1

I am using umbraco 7.2.5

+6
source share
2 answers

After some reading in different forums, I found this to be a common problem. But there is one entry in the Umbraco Wiki that can help you.

This post contains information on writing your own 404 handler . Just create a new class that inherits the umbraco.interfaces.INotFoundHandler interface that defines two properties and one method that should be included in your class.

+1
source

Old question, but it works on Umbraco 7.x

umbracoSettings.config

 <errors> <error404> <errorPage culture="default">1332</errorPage> <errorPage culture="en-US">1332</errorPage> <errorPage culture="sv-SE">1185</errorPage> </error404> </errors> 

web.config

Add below <system.webServer>

 <httpErrors existingResponse="PassThrough"/> 
0
source

Source: https://habr.com/ru/post/989144/


All Articles