6
votes

My issue is actually close to this one: Umbraco V6 404 not handled properly according to culture

I have 2 directories with different culture:

Content
       EN
          page1
          page2
          404
       FR
          page1
          404

When I go from a FR page to a 404, the culture is back in english.

It looks like it's url-based, and probably with a 404 the engine can't find a link so it sets the culture as default but I would like to maintain this culture when the user meets a 404 page.

my config:

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

How can I do that ?

I use one-level path in domains.

Example of urls:

  • site/en/page1
  • site/en/page2
  • site/fr/page1

I use umbraco 7.2.5

2
can you try to unpublish the EN node structure and test the FR redirect to the FR 404 page?Mivaweb
I did it. I am not redirected to the fr 404 page.Giu
To the default 404 page or to which page are you redirected now?Mivaweb
Sorry for the lack of details, I am redirected to the default 404 page aka 'Page not found No umbraco document matches the url '/fr/dsaddsadsdas'. This page can be replaced with a custom 404. Check the documentation for "custom 404". This page is intentionally left ugly ;-) 'Giu
Did you set culture info on EN and FR node? (right click on FR node and set it)Morten OC

2 Answers

1
votes

After some reading on different forums I found that this is a common issue. But there is one post on the Umbraco Wiki that maybe can help you out.

This post contains information about writing your own 404 handler. Just create a new class that inherist from the umbraco.interfaces.INotFoundHandler interface which defines two properties and one method that needs to be included in your class.

0
votes

Old question but this 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 to <system.webServer>

<httpErrors existingResponse="PassThrough"/>