The 7.x-1.x branch of styles is missing styles_style_flush(). While styles isn't a dependency of media_gallery, there is still a call to this function in the module's .install file:
// media_gallery.install, line 64
if (module_exists('styles')) {
styles_style_flush(); // this function does not exist in styles 7.x-1.x !
}
The error is easily reproduced by:
1) Download and enable the supported styles 7.x-1.0-alpha4 release
2) Download and attempt to enable Media Gallery 7.x-1.x-dev . The call to styles_style_flush() in media_gallery.install, line 64 will fail:
$ drush -y en media_gallery
The following extensions will be enabled: media_gallery, multiform
Do you really want to continue? (y/n): y
PHP Fatal error: Call to undefined function styles_style_flush() in /home/damien/www/drupal/7.x/sites/all/modules/media_gallery/media_gallery.install on line 64
Drush command terminated abnormally due to an unrecoverable error. [error]
I have attached a patch which also checks for the function existing - thereby bypassing the error at install time. The module has no other references to styles.module so bypassing this flush command (for which I can find no equivalent in styles 7.x-1.x branch) should do the trick.
Patch for 7.x-1.x-dev attached with this one liner change:
if (module_exists('styles') && function_exists('styles_style_flush')) {
styles_style_flush();
}
| Comment | File | Size | Author |
|---|---|---|---|
| media_gallery-styles_1.x_install_fix.patch | 462 bytes | damien_vancouver |
Comments
Comment #1
lsolesen commentedPatch applies cleanly and I think the approach is right.
Comment #2
lsolesen commented