Closed Bug 1567413 Opened 5 years ago Closed 4 years ago

Safari: Language Cookie broken on MDN Website

Categories

(developer.mozilla.org Graveyard :: Localization, defect)

All
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: tobias.muecksch, Assigned: peterbe)

Details

(Whiteboard: [specification][type:bug])

Attachments

(1 file)

What did you do?

I wanted to set my default language for MDN to English. I consulted the following FAQ thread, which suggests to “Set a language preference cookie” by clicking “Yes” in the little dialog after changing the language on the MDN website.

https://discourse.mozilla.org/t/faq-how-do-i-read-mdn-in-english/32085

I scrolled down to the very bottom. I chose en_US as language. The Page reloaded. Content changed to English. On the top right corner a small dialog appears and asks if I want to set English as default language.

I clicked "Yes".

What happened?

I chose en_US as language. The Page reloaded. Content is English. On the top right corner a small dialog asks if I want to set English as default language.

After clicking yes nothing happened. The dialog didn't disappear either. I checked the JS console. This error appears:

TypeError: undefined is not an object (evaluating 'mdn.utils.getCookie')

When re-visiting the page, the language is back to German.

What should have happened?

The language change should be permanent.

Is there anything else we should know?

Browser: Safari 12.1.1
OS: macOS Mojave 10.14.5

I also tried to change the language in my mozilla profile but this setting seems to ignored by the MDN page.

Summary: Language Cookie broken on MDN Website → Safari: Language Cookie broken on MDN Website

Thanks for the detailed bug report. I'll try to reproduce.

Is your browser set to German by default?

I also tried to change the language in my mozilla profile but this setting seems to ignored by the MDN page.

Which "mozilla profile" are you referring to?

Is your browser set to German by default?
Yes. To be more precise: I've set German as language for macOS in the system preferences.

Which "mozilla profile" are you referring to?
When I navigate to https://developer.mozilla.org , on the top right corner I can see my profile image. I clicked on it, and then I clicked "Edit profile". This forwards me to this page: https://developer.mozilla.org/de/profiles/tobiasmuecksch/edit

I hope that is precise enough. Let me know if you need any additional info.

Is your browser set to German by default?

Yes. To be more precise: I've set German as language for macOS in the system preferences.

Which "mozilla profile" are you referring to?

When I navigate to https://developer.mozilla.org , on the top right corner I can see my profile image. I clicked on it, and then I clicked "Edit profile". This forwards me to this page: https://developer.mozilla.org/de/profiles/tobiasmuecksch/edit

I hope that is precise enough. Let me know if you need any additional info.

Yay! I can now reproduce it.

Note-to-self;

  1. First go to http://mdn.localhost:8000/en-US/
  2. Scroll down to the bottom of the page and chose "Deutsch (de)"
  3. That does reload the page and now the home page is in German. Good.
  4. Also, now on the home page the little pop-up dialog appears and I click "Ja" to say yes to switch over to German.
  5. Clicking that "Ja" attempts to do a HTTP POST to http://mdn.localhost:8000/i18n/setlang/

But it fails to make that HTTP POST in the first place, because it can't extract the CSRF token. Because mdn.utils.getCookie doesn't exist. Because mdn.utils is undefined.

After having clicked "Ja"

(ignore the line above in the web console. that's me putting some debugging console.logs in kuma/static/js/main.js:102

Assignee: nobody → peterbe
Status: UNCONFIRMED → NEW
Ever confirmed: true
MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: