In certain cases I can't fully describe (however it's a persistent issue) no information is retrieved from
function media_media_browser_plugin_info() since file media.media.inc doesn't get included.

CommentFileSizeAuthor
#1 media_plugin_info-1751132-1.patch432 byteslex0r
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lex0r’s picture

The patch (rolled against commit 738a19921453979a2aeaffcca2a66a0b5192beb0)

Dave Reid’s picture

Status: Active » Postponed (maintainer needs more info)

I could use more information on what this happens. The module implements should be assumed to work and we shouldn't have to call this manually. I haven't experienced this recently on any of my sites, so maybe it's something specific to your install? Are you able to reproduce this with a fresh install of core + CTools + Views + File entity + Media?

wodenx’s picture

Status: Postponed (maintainer needs more info) » Active

I can confirm that this is still a problem with 7.x-2.x-unstable6+39dev

The hook is not invoked unless the file (media.media.inc) is loaded, because of the file_exists() check in module_invoke_all().

This is an intermittent problem because media caches the media info array -- so if media_get_browser_plugin_info() is called on one request in which media.media.inc has been loaded, the info will be available for subsequent requests even if that file is not available ... until the cache is cleared.

Probably the easiest way to reproduce the problem is to clear the cache immediately before trying to open the media browser modal from a media field.

Another solution would simply be to move the hook implementation into media.module.

Chris Gillis’s picture

Issue summary: View changes
Status: Active » Fixed

I was encountering this exact same issue on version 7.x-2.0-alpha2+10-dev. I upgraded module to 7.x-2.0-beta1 and the issue disappeared instantly. Based on that, this seems to have been fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.