Closed Bug 1325046 Opened 7 years ago Closed 7 years ago

Implement Existing In Product URL Format That Allows For Redirecting Based on Various Parameters

Categories

(support.mozilla.org - Lithium :: Feature request, enhancement, P1)

enhancement

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: giorgos, Unassigned)

References

()

Details

(Whiteboard: [li-00136770][li-00137108])

Kitsune allows users with the right privileges to create special redirects for In Product URLs.

Those redirects are in the form 

/1/<product>/<version>/<platform>/<locale>/<topic>/


Kitsune can accept wildcards and calculate the best redirect dynamically for each client

e.g.

https://support.mozilla.org/1/Firefox/*/*/*/sync-upgrade -> kb/firefox-sync-upgrade-frequently-asked-questions


https://support.mozilla.org/1/mobile/*/*/*/usage-data -> kb/send-anonymous-usage-data-firefox-mobile-devices
Joni can you please give guidance on how to migrate these? If this is a fixed list of redirects we can hardcode it as with other redirects, if you need to edit this and add/edit/remove redirects probably a customization is needed.
Flags: needinfo?(jsavage)
We will need the ability to edit and add redirects. I add or edit at least one redirect each month. 

We've never had to delete redirects though, and we can get away with not having the ability to delete.
Flags: needinfo?(jsavage)
OK so as far as I understand this is not a simple .htaccess migration from Kitsune to Lithium. 

I'm available to explain in more detail what's happening in Kitsune code wise and I believe that Joni and other stake holders should create a list of requirements of what this should do on Lithium and then see if Lithium supports it out of the box or we have to implement it. After that I can help migrate existing content.

Madalina can you please take over this to lead decision making and implementation?
Flags: needinfo?(mana)
Thanks Giorgos.

Joni, can you make a list of requirements for this? Is it just edit/add/delete?

Roland, Michal any comments/requirements?
Flags: needinfo?(rtanglao)
Flags: needinfo?(mdziewonski)
Flags: needinfo?(jsavage)
Sure thing. I'd like it pretty close to what we have on Django as far as functionality goes (Django:https://support.mozilla.org/admin/inproduct/redirect/). I don't have specific requirements for the UX/UI. More specifically:


1. Ability to add redirects:
- This will have field(s) where I can designate a product and topic for the URL that the product team will hardcode into their UI. The text I enter in these fields will be plugged into the URL format that we use: https://support.mozilla.org/1/[product]/%VERSION%/%OS%/%LOCALE%/[topic]
- This should have a field that lets me enter the target link that we need to redirect to.

2. Ability to edit redirects:
- I should be able to change any of the text I enter in the previous item.

3. Delete redirects:
- I should be able to delete a redirect altogether.
Flags: needinfo?(jsavage)
Besides the add/edit/delete functionality it's very important to set the requirements of the module itself, i.e. what we want to achieve, so we can ask Lithium and get the best solution. So for example:

"We have a number of in product URLs which we want to be able to redirect to different pages of the Lithium installation based on any combination of product, version, platform, locale, topic as extracted from the URL."

The requirements should explain all details we want, like we want wildcard functionality, regex support, which redirect is selected in case many redirects match and what happens if no redirect is matched. 

This is the kind of requirements I's looking for. They don't have to be technical but they have to describe what we want this module to do.
Thanks for the clarification. Your example pretty much hits the requirements we want.

We'd like to be able to redirect our in-product URLs to specific pages based on product, version, platform, locale and topic as extracted from the URL (currently in this URL structure: https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/TOPIC).

We won't need wildcard functionality. I don't foresee many redirects matching since we enter the target manually. Can we have some kind of indicator to tell us if there are no matching redirects? If there are no matching redirects, a 404 page would be a decent workaround, but I'd like an indicator for us so we can fix it.
(In reply to Joni Savage ("need info" me) from comment #7)
> We won't need wildcard functionality. I don't foresee many redirects
> matching since we enter the target manually. Can we have some kind of
> indicator to tell us if there are no matching redirects? If there are no
> matching redirects, a 404 page would be a decent workaround, but I'd like an
> indicator for us so we can fix it.

By wildcard functionality I mean that you can match any of the product, version, platform, locale as we do now. I see entries with

/Firefox/*/*/*/foo-bar

which is using wildcards to match any version, platform and locale.

I don't see a reason why the "topic" should allow for wildcards since it's entered manually as you say and also increases the complexity drastically.
Got it. With this clarification in mind, here are our requirements:

We have URLs that are linked from the Firefox UI that we want to redirect to specific articles. Here are our requirements:

1. Redirects would be based on on product, version, platform, locale and topic as extracted from the URL (currently in this URL structure: https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/TOPIC).

2. The Version/OS/Locale would allow for wildcards. Example: /Firefox/*/*/*/topic

3. An internal/contributor-facing indicator to tell us that there are no matching redirects or if there are multiple matching redirects (unlikely) so we can fix it.

4. End-users would see a 404 page if there are no matching redirects or if there are multiple matching redirects.
 
5. Ability to add redirects:
- This will have field(s) where I can designate a product and topic for the URL that the product team will hardcode into their UI. The text I enter in these fields will be plugged into the URL format that we use: https://support.mozilla.org/1/[product]/%VERSION%/%OS%/%LOCALE%/[topic]
- This should have a field that lets me enter the target link that we need to redirect to.

6. Ability to edit redirects:
- I should be able to change any of the text I enter in the previous item.

7. Delete redirects:
- I should be able to delete a redirect altogether.
Scott, can Lithium provide the above requirements?
Flags: needinfo?(mana) → needinfo?(scott.riley)
Summary: In Product URLs Redirects → In Product URLs Redirects Customization
See also bug 1331332 for the hardcoded list of In Product Redirects which will be used for the migration.
See Also: → 1331332
@Madalina, Roland - do we have a case ID on Lithium's issue tracker that we could use as reference here?
Flags: needinfo?(mdziewonski) → needinfo?(mana)
Lithium case numbers: 00136770 and 00137108
Flags: needinfo?(mana)
Component: Lithium Migration → Knowledge Base Content
Product: support.mozilla.org → support.mozilla.org - Lithium
Blocks: 1350845
Summary: In Product URLs Redirects Customization → In Product URLs Redirects Lithium Customization
Component: Knowledge Base Content → Knowledge Base Software
Component: Knowledge Base Software → Feature request
Priority: -- → P1
Blocks: 1358221
No longer blocks: 1358379
Summary: In Product URLs Redirects Lithium Customization → Implement Existing In Product URL Format That Allows For Redirecting Based on Various Parameters
1.) I have taken the liberty of removing NI scott.
2.) As this is a P1 bug with apparently a couple of active case reports should this be assigned to a Sumo/Mozilla person now ?
3.) Any progress on those case reports apparently filed a couple of months ago?
     Or have they been superseded by other Lithium case reports or other Sumo bugs ?
Flags: needinfo?(scott.riley)
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.