← Back to postsDrupal 7 - Update Problems - Media/File Entity

Drupal 7 - Update Problems - Media/File Entity

Published: 4/29/2017

A quick Google search shows you that the Media and File Entity modules have been causing trouble for many years for those attempting to upgrade one or the other. Just take a look at some of these articles:

I, too, have had some challenges in the past updating these modules, so when I ran into issues applying the 7.x-2.0 Media module update released on April 6, 2017, I decided to document how I resolved these issues and successfully updated.

On my first attempt, update.php indicated that 22 database updates could not be applied due to a dependency on File Entity 2.x. I confirmed (at least from a visual inspection) that I had the 2.x version of File Entity. I tried applying patches from the above-referenced articles, but one of the patches failed, and another one only allowed me to apply some of the database updates.

I started over with a clean copy of the media module by deleting the folder in sites/all/modules. Same problem. It then occurred to me that even though my File Entity version looked up to date, perhaps it wasn't. I deleted the module folder in sites/all/modules, downloaded a new copy of File Entity, applied it and ran update.php.

Magic. Pure magic.

Lesson learned: Don't assume. If Drupal is telling you a dependency is missing, try downloading the module again.