Hello, After spending many hours fixing an issue (Table 'image_dimensions' not created on update) my media 1.4 module ended up inside a folder named 'sites/all/modules/media_1.3).

When I upgrade the module via Drush, the folder name changes back to 'media', which then causes the entire site throw the following error:

Fatal error: require_once() [function.require]: Failed opening required '/home/irfanped/public_html/tork-multi/sites/all/modules/media_1.3/includes/MediaReadOnlyStreamWrapper.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/irfanped/public_html/tork-multi/includes/bootstrap.inc on line 3177

This error doesn't go away until I change the folder name back to 'media_1.3'

To me, it seems the folder name 'media_1.3' is hard-coded into bootstrap.inc, which doesn't seem believable. Or is it that bootstrap.inc is grabbing the name from database?

How do I fix this so media folder can stay named as 'media', as I assume it should be?

Any help would be appreciated.

CommentFileSizeAuthor
#6 media_module_in_modules_page.jpg56.93 KBAleet
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Aleet’s picture

Hello, line 3177 of my bootstrap.inc doesn't contain any hard-coded info about media module, as I expected:

3172  // $type is either 'interface' or 'class', so we only need the first letter to

  // keep the cache key unique.

  $cache_key = $type[0] . $name;

  if (isset($lookup_cache[$cache_key])) {

    if ($lookup_cache[$cache_key]) {

3177      require_once DRUPAL_ROOT . '/' . $lookup_cache[$cache_key];

    }

return (bool) $lookup_cache[$cache_key];

}

Not sure what the code is looking at. Any help would be appreciated. Thanks.

Aleet’s picture

Issue summary: View changes
steinmb’s picture

Status: Active » Postponed (maintainer needs more info)
Aleet’s picture

Hello steinmb, thank you so much for your reply.

From the link you posted, it seems I either need to either

1. Disable the media module completely and then try changing the folder name.

2. Change the folder name and run Drush rebuilt registery.

The second option didn't work. I got the same error again after I changed the folder name and ran drush rr and drush cc all and then drush rr again:

Fatal error: require_once() [function.require]: Failed opening required '/home/irfanped/public_html/tork-multi/sites/all/modules/media_1.3/includes/MediaReadOnlyStreamWrapper.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/irfanped/public_html/tork-multi/includes/bootstrap.inc on line 3177

The first option - disabling media module - I need your advice: it won't disable on modules page because it says the field is in use and there are dozens of nodes already using this module.

Further, this is a multisite. There are at least two other sites using this same installation of the Media module.

Is the only way to disable media to delete the fields that are using Media - thus losing the content they carry in all those nodes?

steinmb’s picture

Temporary disabling a module is not destructive to your data. Uninstalling a module on the other hand, is.

Aleet’s picture

Hi Steinmb, but it appears Media module won't disable as long it is in use. See the screenshot. I have disabled all the "required by" modules but the check button is still grayed out. How would I disable it then?

Aleet’s picture

Hi Steinmb, but it appears Media module won't disable as long it is in use. Please see the screenshot below. I have disabled all the "required by" modules but the check button is still grayed out. How would I disable it?

steinmb’s picture

Status: Postponed (maintainer needs more info) » Active
Chris Matthews’s picture

Version: 7.x-1.4 » 7.x-1.x-dev
Status: Active » Closed (outdated)

Closing this issue as outdated. However, if you think this issue is still important, please let us know and we will gladly re-open it for review.
sincerely,
- the Drupal Media Team