Firefox for iOS page URL keeps getting rewritten for no apparent reason

NEW
Unassigned

Status

developer.mozilla.org
Wiki pages
--
major
3 years ago
2 years ago

People

(Reporter: sheppy, Unassigned)

Tracking

(Blocks: 1 bug, {in-triage})

Details

(Reporter)

Description

3 years ago
The Firefox for iOS page is located at https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_for_iOS. However, when you visit it, the URL in the URL bar gets rewritten to https://developer.mozilla.org/en-US/Firefox_for_iOS. Yes, the page loads, but that is not the correct URL.

I've checked and it's not a wiki-side redirect, so something on the server is doing it.

While https://developer.mozilla.org/en-US/docs/Mozilla/Firefox is a zone whose URL is remapped intentionally to https://developer.mozilla.org/en-US/Firefox, that shouldn't affect other content outside that hierarchy.

Please help figure out and fix this problem before this incorrect and inadvisable URL spreads.
Severity: normal → major
Keywords: in-triage
This redirect works as intended, the document zone middleware checks for the prefix "/docs/Mozilla/Firefox" and replaces it with "/Firefox" here: https://github.com/mozilla/kuma/blob/42ee383820afcf506ef10ec699675d574d26db2f/kuma/wiki/middleware.py#L34

I guess what you're assuming is that only *subpages* of "/docs/Mozilla/Firefox" should be redirected. If that's the case let me know.
Flags: needinfo?(eshepherd)
(Reporter)

Comment 2

3 years ago
(In reply to Jannis Leidel [:jezdez] from comment #1)
> This redirect works as intended, the document zone middleware checks for the
> prefix "/docs/Mozilla/Firefox" and replaces it with "/Firefox" here:
> https://github.com/mozilla/kuma/blob/
> 42ee383820afcf506ef10ec699675d574d26db2f/kuma/wiki/middleware.py#L34
> 
> I guess what you're assuming is that only *subpages* of
> "/docs/Mozilla/Firefox" should be redirected. If that's the case let me know.

Yes, only subpages of /docs/Mozilla/Firefox/ should be getting redirected. The Firefox for iOS page is not part of that hierarchy so should not be treated as if it were part of the zone by the redirect.
Flags: needinfo?(eshepherd)

Comment 3

3 years ago
I'm wondering what the problem with the (redirected) URL is? Where foes Firefox for Android sit? Should they all be part of the Firefox hierarchy?(e.g. firefox desktop, firefox for android, firefox for IOS), or do we intentionally treat them as totally separate top-level products for UX purposes?
(Reporter)

Comment 4

3 years ago
(In reply to ali spivak from comment #3)
> I'm wondering what the problem with the (redirected) URL is? Where foes
> Firefox for Android sit? Should they all be part of the Firefox
> hierarchy?(e.g. firefox desktop, firefox for android, firefox for IOS), or
> do we intentionally treat them as totally separate top-level products for UX
> purposes?

Well, those currently get redirected to the top level too, but given that we're talking about killing off zones, it seems silly to start people off with the older URL form instead of just using docs/Mozilla/Firefox_iOS or whatever, since that's going to be the correct URL soon.
Sheppy is correct, the correct URL should be: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_for_iOS 

Note that we need to put a redirect for the wrong cases like https://developer.mozilla.org/en-US/Firefox_for_Android because else we lose links and it is the URL referenced in search engine.

We need to check if there are other similar cases, under Firefox but also other zones. Sheppy can you list all the problematic pages so we can open a redirect bug that lands before this one is fixed?
Flags: needinfo?(eshepherd)
(Reporter)

Comment 6

3 years ago
(In reply to Jean-Yves Perrier [:teoli] from comment #5)
> Sheppy is correct, the correct URL should be:
> https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_for_iOS 
> 
> Note that we need to put a redirect for the wrong cases like
> https://developer.mozilla.org/en-US/Firefox_for_Android because else we lose
> links and it is the URL referenced in search engine.
> 
> We need to check if there are other similar cases, under Firefox but also
> other zones. Sheppy can you list all the problematic pages so we can open a
> redirect bug that lands before this one is fixed?

Seems to me that it would be easier to simply code the Python code that does the rewrite so it checks for a slash after the base URL for the zone in the page being loaded, and if there isn't slash (or end-of-string), it's not in the zone. Isn't that literally all that has to be done here?
Flags: needinfo?(eshepherd)
As it is not a recent regression, there are a few points to consider here before going forward.

1. How many current pages are impacted? Firefox_for_Android and Firefox_for_iOS are the only two listed for the moment.
2. Do these pages have external links to their wrong-since-2013 urls? If so we have to assess if we can afford to break these links. 

If we can afford killing these links, we may want to go ahead (unless zone killing is too near), if we can't, we will need to be sure we will have redirect in places from these old wrong urls to the new correct ones (at the same time we push the fix).

We need this information to go forward. Sheppy, can you do this research?

Also is this a problem if Firefox_for_iOS is at the wrong place for 3-4 months? 

Is it more work to add an http redirect then, or to fix this problem? (This third question is for Jannis)
Flags: needinfo?(jezdez)
Flags: needinfo?(eshepherd)
(Reporter)

Comment 9

3 years ago
Looks like Luke answered the questions that were asked of me.

Jannis still needs to look at comment #7 though.

It doesn't sound like we're breaking the world if we make this change, based on the stats Luke mentions in comment #8. I think we should go ahead and fix this.
Flags: needinfo?(eshepherd) → needinfo?(jezdez)
:sheppy - we still need a list of all of the problematic zones like this before we can know the scope of the fix.
Flags: needinfo?(jezdez)
Flags: needinfo?(eshepherd)
(Reporter)

Comment 11

3 years ago
The only ones are the "Firefox" zone as far as I'm able to tell. It's all about having leading text that's the same. We just don't have many cases where a zone starts with a string that's a common start of other page slugs.
Flags: needinfo?(eshepherd)
Assignee: nobody → lcrouch
Assignee: lcrouch → nobody
Blocks: 1158239
You need to log in before you can comment on or make changes to this bug.