Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page Not Found page doesn't respect default site locale #7909

Closed
hissy opened this issue Jun 21, 2019 · 10 comments
Closed

Page Not Found page doesn't respect default site locale #7909

hissy opened this issue Jun 21, 2019 · 10 comments
Labels
Status:Available Reviewed issue, it’s real, we’d review a pull request. Type:Bug Existing functionality not performing as expected.

Comments

@hissy
Copy link
Contributor

hissy commented Jun 21, 2019

If you access to YOUR_SITE/page_not_found, the active locale is the same as the default site.
However, if you access to YOUR_SITE/foo (or any other missing URLs), the active locale is always en_US.
Please see the attached image. Tested on 8.5.2a1.

Screen Shot 2019-06-21 at 14 52 22

This is a very similar issue with #6500, but it happens on non-multilingual site.

@aembler aembler added accepted:info needed Status:Available Reviewed issue, it’s real, we’d review a pull request. Type:Bug Existing functionality not performing as expected. labels Jun 25, 2019
@aembler
Copy link
Member

aembler commented Jun 25, 2019

Can you describe the setup here? Is this a site where you have a custom language set for concrete5? Is this a site with Japanese set as the language but no other multilingual locales? Just trying to understand what's happening here.

@hissy
Copy link
Contributor Author

hissy commented Jun 27, 2019

Tested on clean installed concrete5 with the guest account.

+---------------------------+-------------------+
| Question                  | Value             |
+---------------------------+-------------------+
| language                  | ja_JP             |
| site-locale               | ja_JP             |
+---------------------------+-------------------+

/page_not_found : lang=ja
/foo : lang=en

+---------------------------+-------------------+
| Question                  | Value             |
+---------------------------+-------------------+
| language                  | ja_JP             |
| site-locale               | en_US             |
+---------------------------+-------------------+

/page_not_found : lang=ja
/foo : lang=en

+---------------------------+-------------------+
| Question                  | Value             |
+---------------------------+-------------------+
| language                  | en_US             |
| site-locale               | ja_JP             |
+---------------------------+-------------------+

/page_not_found : lang=en
/foo : lang=en

+---------------------------+-------------------+
| Question                  | Value             |
+---------------------------+-------------------+
| language                  | en_US             |
| site-locale               | en_US             |
+---------------------------+-------------------+

/page_not_found : lang=en
/foo : lang=en

@hissy
Copy link
Contributor Author

hissy commented Aug 15, 2019

This issue is reported on Japanese forum
https://concrete5-japan.org/community/forums/chat/post-18212/

@hissy
Copy link
Contributor Author

hissy commented Sep 12, 2019

A new and same report from Japanese forum
https://concrete5-japan.org/community/forums/development/post-18446/

@africanforest
Copy link

africanforest commented Oct 2, 2020

I can confirm this issue (version 8.5.4, German language as default). While a customized login page is always automatically translated to the default language of the site, the Page Not Found page always appears in English, no matter which way of customization you go (custom single page or page_not_found.php within the theme). In this case the T-Strings will not be translated.

@hissy
Copy link
Contributor Author

hissy commented May 2, 2021

@mlocati

I have a question for you. You moved setupSiteInterfaceLocalization() after the redirection at the commit ca0970b . Is there any reason to do that? Because I'm planning to move it to the earlier position in \Concrete\Core\Http\ResponseFactory::collection method to fix this issue. I'd like to know why you moved it later.

@mlocati
Copy link
Contributor

mlocati commented May 3, 2021

@hissy the actual commit is b1e4dbf (see its comment for the reason)

@hissy
Copy link
Contributor Author

hissy commented May 6, 2021

@mlocati Thanks. So, we shouldn't call setupSiteInterfaceLocalization before getting multilingual_default_locale from the session, right?

@mlocati
Copy link
Contributor

mlocati commented May 6, 2021

Yes, I'm pretty sure that's the reason why I moved setupSiteInterfaceLocalization down a few lines (but really, I can't remember what I ate yesterday, how could I remember what I did 4 years ago? 😉)

@hissy
Copy link
Contributor Author

hissy commented May 7, 2021

OK, I'll check. Thanks!

hissy added a commit to hissy/concrete5 that referenced this issue Jul 21, 2021
hissy added a commit to hissy/concrete5 that referenced this issue Jul 22, 2021
See discussion about this change: concretecms#7909

(cherry picked from commit 9eff103)
KorvinSzanto pushed a commit to concretecms/concretecms-core that referenced this issue Jul 23, 2021
See discussion about this change: concretecms/concretecms#7909

(cherry picked from commit 9eff103)
KorvinSzanto pushed a commit to concretecms/concretecms-core that referenced this issue Aug 4, 2021
See discussion about this change: concretecms/concretecms#7909

(cherry picked from commit 9eff103)
aembler pushed a commit to concretecms/concretecms-core that referenced this issue Mar 14, 2022
@aembler aembler closed this as completed Mar 14, 2022
KorvinSzanto pushed a commit to KorvinSzanto/test-splitsh that referenced this issue Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status:Available Reviewed issue, it’s real, we’d review a pull request. Type:Bug Existing functionality not performing as expected.
Projects
None yet
Development

No branches or pull requests

4 participants