Closed
Bug 1051539
Opened 11 years ago
Closed 9 years ago
Switching from English Article History page to local version fails with 404
Categories
(support.mozilla.org :: Knowledge Base Software, task)
support.mozilla.org
Knowledge Base Software
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Tonnes, Assigned: safwan)
References
Details
From a local article's history page, it's easy to switch to the English history. However, switching back is harder, as there is no link to the local version.
Switching the entire page using the top menu locale switcher ends up with a 404. The url pointed at ends with /history - the local page itself with <locale>/kb/<english slug> works fine.
STR:
1) Open https://support.mozilla.org/en-US/kb/unable-install-add-ons-or-extensions/history
2) Choose another language in the top right.
Result:
Page gets 404, e.g. https://support.mozilla.org/nl/kb/unable-install-add-ons-or-extensions/history
Expected:
Page should show page history for chosen locale
OR (and?)
English page history should also display Revision History link for own locale after switching to English, like when viewing own locale's history.
Comment 1•10 years ago
|
||
@tonnes I think the 404 pages pops up because there is no history for that particular in the selected locale.
In that case will it be ok to display history in default locale.?
Flags: needinfo?(tonnes.mb)
Reporter | ||
Comment 2•10 years ago
|
||
(In reply to Anush [:anushbmx] from comment #1)
> @tonnes I think the 404 pages pops up because there is no history for that
> particular in the selected locale.
I’m afraid that’s not the reason - it happens with any article that does have a localized version and therefore a history. The article from the URL above has become a bad example though since it has been renamed (Jan 2015) and has become a redirect that doesn’t have localized versions.
It’s probably best to rephrase the STR for the renamed article:
1. Visit https://support.mozilla.org/nl/kb/kan-geen-add-ons-extensies-themas-installeren (Dutch/Nederlands version.)
2. Click "Geschiedenis tonen" (Show History) on the left.
3. Switch to English history by clicking "English" next to "Revisiegeschiedenis voor:" (Revision history for:.)
At this point, the "own" locale is not displayed in history (next to "English", which is basically issue #1), requiring the user to step back a number of pages, or use the locale switcher in the top right as an alternative. To get back to the Dutch version using the switcher, clicking "Nederlands" there points to https://support.mozilla.org/nl/kb/unable-install-add-ons-extensions-or-themes/history, which doesn’t exist (issue #2).
Note that this behavior is also valid when in the "What links here" view that points to a non-existent https://support.mozilla.org/nl/kb/unable-install-add-ons-extensions-or-themes/links.
Purpose of this bug: not have any links from such pages end up with 404, and still offer quick switching between locales, possibly by also showing the own locale in English history while in English view.
Presumed root of the locale switcher issue: support.mozilla.org/<locale>/<english slug>/... never exists and should be prevented from being shown anywhere or get redirected to support.mozilla.org/<locale>/<localized slug>/... Fixing that may solve other issues (i.e. similar links) not mentioned here as well.
> In that case will it be ok to display history in default locale.?
That may solve it for the history view, yes. Would the default locale be the one detected by the browser’s preferred locale, or the one set by the Sumo user preferences?
Flags: needinfo?(tonnes.mb)
Comment 3•10 years ago
|
||
From a technical point here, the main issue seems to be that /kb/{document_slug}/history doesn't have the same sort of inter-language redirection that happens with /kb/{document_slug}. Fixing this would make the language switcher at the top of the page work.
When /kb/{document_slug} is loaded in a non-English locale, we try to look the slug up in that locale. If that fails, we try to look up the document slug in English, and then find a translated version. The logic is actually a bit more complicated than that, but this is close enough. Doing that same English-to-translated-slug trick will fix the history view links via the language switcher.
Getting the "Revision for: English" part of the UI to show "Revision for: English | {own locale}" might be a little challenging, but should be possible if you have defined a preferred locale in your settings. I think the URL redirection issue is more pressing though.
Assignee | ||
Comment 5•9 years ago
|
||
I strongly believe this bug is similar to Bug 1128948.
Assignee | ||
Comment 6•9 years ago
|
||
PR filled: https://github.com/mozilla/kitsune/pull/2779
Assignee: nobody → safwan.rahman15
Assignee | ||
Comment 7•9 years ago
|
||
Deployed into production and it got fixed! :)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•