Posted on July 13, 2015 by Jen Brown
We successfully migrated some client websites, built with Drupal 7.x, from Media 1.x to Media 2.x. This blog post is intended as reference for developers who need to do the same.
We were able to get this working using the following Modules and Libraries:
Modules:
- Colorbox 7.x-2.x
- File entity 7.x-2.0-beta2
- Media and Media WYSIWYG 7.x-2.0-beta1
- WYSIWYG 7.x-2.x-dev (e.g., works with 7.x-2.2+63-dev)
- NO Media Colorbox module -- this module is deprecated for Media 2.x
Libraries
- Colorbox library: 1.x
- CKEditor library 4.4.7.3a35b3d, including 4.4.7 widget plugin
To update a website using drush, use the following commands:
- cd <directory where you run drush from>
- drush dis media -y
- drush dis media_colorbox
- cd <equivalent of sites/all/modules>
- rm -rf media
- rm -rf media_colorbox
- cd <directory where you run drush from>
- drush up colorbox-7.x-2.8
- drush up wysiwyg-7.x-2.x-dev
- drush en file_entity -y
- drush dl media-7.x-2.0-alpha4
- drush en mediafield media_wysiwyg_view_mode media_wysiwyg media_migrate_file_types media_internet media_bulk_upload media -y
- drush updb
- drush cron
- cd <equivalent of sites/all/libraries>
- Then update the libraries (delete old directories and recreate with the correct library versions)
- Then set the permissions (Admin > People > Permissions) for Media permissions, Media Bulk Upload, and File Entity permissions
Categories:
3 Comments
Thanks for the article. 1 Question, after updating, did you not have to convert image fields into file fields? My content types are using image fields and I can not change to file fields because there is data that exists in image fields.
Thanks in advance
Hi Craig,
I tried to be as complete as possible in the directions I gave above. I don't remember converting image fields to file fields; I just checked a couple of the websites I converted and the content types still use image fields. So I think you will be OK.
Good luck! Jen
I'm pretty certain that having to convert image fields to file fields is a myth. I know there's a page on drupal.org that mentions having to do that, but it seems to me that the person who wrote that was confused about what the File Entity module does.
Add your comment