mozilla / sumo

Project management board for SUMO and Community properties.
Mozilla Public License 2.0
14 stars 5 forks source link

Switching kb article from one non-default locale to another 404 #1899

Open janbrasna opened 4 months ago

janbrasna commented 4 months ago

Describe the bug

The language switcher is unable to point to the correct kb article from one non-default locale (or more precisely URL with non-en slug) to another locale, incl. even back to en/default.

Preconditions

Arrive at a kb page in a non-default locale that you perhaps don't understand, and intend to switch to another locale you can read. (Technically: the page has to be translated, to have non-en-default page title, and also not in a language that doesn't put the localised/UTF slug in the URL, so e.g. a Korean would be an exception to this issue.)

Steps to reproduce

  1. Go to http://mzl.la/LqKirE
  2. Switch the language in footer to e.g. Español for https://support.mozilla.org/es/kb/usar-pestanas-para-organizar-muchas-paginas-en-una
  3. Now try to switching the language in footer again to anything else, Deutsch, English, Dansk…
  4. See page not found

This only works when switching away from eg. Korean https://support.mozilla.org/ko/kb/tabs-organize-websites-single-window, because that has the default slug in URL preserved and can be navigated to any other language without any error.

Expected behavior

Being able to switch arbitrarily, e.g. from https://support.mozilla.org/da/kb/saadan-indstiller-du-din-startside to https://support.mozilla.org/nl/kb/De%20startpagina%20instellen

Actual behavior

The switch ends up not found https://support.mozilla.org/nl/kb/saadan-indstiller-du-din-startside (Dutch locale with Dansk slug)

Desktop (please complete the following information):

emilghittasv commented 4 months ago

Similar with https://bugzilla.mozilla.org/show_bug.cgi?id=1712243 & https://github.com/mozilla/sumo/issues/851