1

I have setup a custom 404 page, as described on "How to change the default 404 error page with custom page from pages app".

Like the rest of my pages created with Magnolia CMS' "page app", that custom 404 error page is multilingual.

However, when redirected to my custom 404 error page, I am always shown the default language. Even if the page I am trying to reach was expected to be in another language.

For instance: with "English" as defined default language, I am navigating the German version of the website & at some point click on an (dead) internal link, I land back on the English version of the 404 page (when German was expected).

Is there a mechanism/configuration to correct this?

Community
  • 1
  • 1
Adriano
  • 19,463
  • 19
  • 103
  • 140
  • 1
    If your 404 page is served by magnolia, I would create and use a new model class for it, and in the model class, I'd parse the URL (because it should be still the original one, i.e. of the requested page), and switch the Locale accordingly. I am afraid there is no built-in mechanism for that (at least I can't remember one). – Jozef Chocholacek Oct 13 '16 at 06:50
  • @JozefChocholacek this blog post suggests using a `custom filter` listening for `404 responses` so that it can use logic to determine the original requested locale and then forward it appropriately. http://tmiyar.blogspot.de/2012/07/localized-404-errors.html – Adriano Oct 31 '16 at 10:05
  • 1
    Well, that's a valid solution, too. The disadvantage is you're fiddling with Magnolia core functionality, which could cause repercussions in the future, if the core code changes. – Jozef Chocholacek Oct 31 '16 at 10:27

0 Answers0