Download & Extend

Convert from img_assist tags to media tags during migration

Project:Migrate Extras
Version:7.x-2.x-dev
Component:Media
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed

Issue Summary

There are still 17k sites using img_assist, and there's no upgrade path (image.module still doesn't have one), so it'd probably be incredibly helpful for a lot of people to have a migration directly from an img_assist-based site straight to a media.module-based site. I was wondering how hard it would be to implement this conversion as part of a mapping?

img_assist tags look like:

[img_assist|nid=49|title=|desc=|link=none|align=middle|width=500|height=526]

while media module tags look like this (link tag and style attributes added by CKeditor in WYSIWYG API):
<a href="blah">[[{"type":"media","view_mode":"media_large","fid":"13","attributes":{"alt":"","class":"media-image","style":"width: 349px; height: 480px; float: right;","typeof":"foaf:Image"}}]]</a>

Some of this is probably pretty straight forward and I can just rip the parsing/encoding code directly from the associated modules. But the file id would obviously depend on the migration from image.module to what ever other storage (I was assuming a similar setup - "image" content type with image field).

I will have a look further into it and re-open, but as I haven't jumped into migrate.module much yet, I'd be interested in any advice anyone can give.

Comments

#1

Project:Migrate» Migrate Extras
Version:7.x-2.x-dev» 7.x-2.x-dev
Component:Code» Media
Category:support request» feature request

The right place to add this would be in Migrate Extra's media module support.

#2

I would love to hear if anyone has made progress on this.
Maria

nobody click here