Closed Bug 761826 Opened 13 years ago Closed 13 years ago

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

Categories

(developer.mozilla.org Graveyard :: Editing, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lorchard, Assigned: jbennett)

References

Details

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

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
Blocks: 710728
Whiteboard: u=contributor c=wiki s=2012-06-19 p=
Whiteboard: u=contributor c=wiki s=2012-06-19 p= → u=contributor c=wiki s=2012-06-19 p=2
Depends on: 710718
No longer depends on: 710718
Depends on: 710718
No longer blocks: 710728
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: nobody → jbennett
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.
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
I suspect that once the file migration has been run, this bug will have been fixed.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Version: Kuma → unspecified
Component: Docs Platform → Editing
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.