Ensure legacy URLs are routed to new URLs of migrated file attachments

RESOLVED FIXED

Status

developer.mozilla.org
Editing
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: lorchard, Assigned: ubernostrum)

Tracking

Details

(Whiteboard: u=contributor c=wiki s=2012-06-19 p=2 t=2012-07-09)

(Reporter)

Description

6 years ago
This page:
  https://developer.mozilla.org/en/Storage

Uses this template:
  https://developer.mozilla.org/Template:warning

And that template uses this image:
  https://developer.mozilla.org/@api/deki/files/283/=Nuvola_apps_important.png

I'm sure there are more. Let's make sure we catch all these and ensure:

1) That the images get copied over to the new site
2) That templates are updated to use the new URLs, assuming they move, or that we at least have mod_rewrite rules in place
(Reporter)

Updated

6 years ago
Blocks: 710728
(Reporter)

Updated

6 years ago
Whiteboard: u=contributor c=wiki s=2012-06-19 p=

Updated

6 years ago
Whiteboard: u=contributor c=wiki s=2012-06-19 p= → u=contributor c=wiki s=2012-06-19 p=2
(Reporter)

Updated

6 years ago
Depends on: 710718
(Reporter)

Updated

6 years ago
No longer depends on: 710718
(Reporter)

Updated

6 years ago
Depends on: 710718
(Reporter)

Updated

6 years ago
No longer blocks: 710728
(Reporter)

Updated

6 years ago
Summary: Ensure common media used in templates are carried over from MindTouch → Ensure legacy URLs are routed to new URLs of migrated file attachments
(Assignee)

Updated

6 years ago
Assignee: nobody → jbennett
(Assignee)

Comment 1

6 years ago
Commenting as a reminder to myself:

This is going to require a slight change to the schema for files in kuma; currently, we're only storing the MindTouch ID of the resource corresponding to the file when migrating. But to preserve legacy URLs, we will also need the MindTouch API ID, which is different.

The ultimate solution here is going to be to have the migration shove both the resource ID, and a lookup from the resourcefilemap table, into the kuma Attachment object, and then we'll handle MindTouch file URLs by pulling the resourcefilemap ID out of the URL. So once the migration is done, we will be able to eventually throw away the resource ID, which is only there for migration bookkeeping, but we'll have to keep the resourcefilemap ID.

Comment 2

6 years ago
Commit pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/4c748a33b7a3d8096ccbd55c400d5c69b6821691
Bug 761826: Handle legacy MindTouch file URLs.

This is simply a URL pattern and corresponding view which responds to
the MindTouch file URL scheme, looks up the correspondong kuma
Attachment, and issues a redirect.

It is relatively future-proof for the case where kuma's own file URL
patterns change (very likely), and is testable independent of having a
fully-migrated set of files (very handy). Test cases are actual
MindTouch URLs, with corresponding dummy Attachments created so kuma
has something to redirect to.
Whiteboard: u=contributor c=wiki s=2012-06-19 p=2 → u=contributor c=wiki s=2012-06-19 p=2 t=2012-07-09
(Reporter)

Comment 3

6 years ago
I suspect that once the file migration has been run, this bug will have been fixed.
Depends on: 772157
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Version: Kuma → unspecified
Component: Docs Platform → Editing
Product: Mozilla Developer Network → Mozilla Developer Network
You need to log in before you can comment on or make changes to this bug.