Hello,

You may already be aware of this error, but I just installed this module on a developement site I have and whenever I activate the module, I get this error:
<strong>Fatal error:</strong> Unsupported operand types in /server/path/to/site/sites/all/modules/media/includes/media.browser.inc on line 52

I really don't have anything else to report, other than I'm running Drupal 7.10 with PHP Version 5.2.17.

I will try installing the 1.0-beta version and see how that works.

Good luck in your development and this module looks promising from it's description.

Steve

Comments

Sebastian.Buesing’s picture

It would really help us to know which media module version you are using in order to fix this. ;-)

ParisLiakos’s picture

.

segi’s picture

The problem cause that,

function media_browser_plus_media_browser_plugin_info() {
  $plugins = array();
  $plugins['library_plus'] = array(
    'title' => t('Library Plus'),
    'weight' => 10,
    'handler' => array(
      'path' => drupal_get_path('module', 'media_browser_plus') . '/includes',
      'file' => 'MediaBrowserPlusLibrary.inc',
      'class' => 'MediaBrowserPlusLibrary',
    ),
    // @todo Replace with appropriate file access function when that gets
    //   committed to File Entity project.
    'access callback' => 'media_access',
    'access arguments' => array('view'),
  );
  return $plugins;
}

There is set a library_plus index to $plugins array and when media module try to process this array it find an unknown index, because media_media_browser_plugin_view function accept only two kind of index library and upload.

Sebastian.Buesing’s picture

Seems like either the plugin call or the plugin array are broken. I'd recommend changing the line

$plugin += module_invoke($plugin['#module'], 'media_browser_plugin_view', $key, $params);

into

$return = module_invoke($plugin['#module'], 'media_browser_plugin_view', $key, $params);
$plugin += $return; // set breakpoint here or print out both variables to see whats wrong.
segi’s picture

The problem is, which i wrote above, when the module_invoke() fuction try to call the media_browser_plugin_view and it gets media_plus index. The media_browser_plugin_view() function give back NULL, because it gets an unknown index, so it hasn't return value. I think media_plus index not a mistake, only it is not handled correctly somewhere.

wickwood’s picture

Sorry I neglected to mention the Media Module Version. I have Media 7.x-1.0-rc2 installed.

BTW, I pulled out the Media Browser Plus 7.x-2.x-dev version and replaced it with 7.x-1.0-beta3 and the problem disappeared.

I installed Media Browser Plus 7.x-2.x-dev version because that is the version Drush Make pulled when I just used projects[] = media_browser_plus in my Drush Make file. I'm a Drush Make noob and I have found that a few modules had the dev version pulled instead of the stable version and this is one of them.

Anyways, I hope that my report has helped you in someway and didn't just take up your time.

Steve

Zach’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
Status: Active » Fixed

I had this error when using
Media:
7.x-1.0-rc3
Media Browser Plus:
7.x-1.0-beta3

Solutions was:

Media:
7.x-1.x-dev
Media Browser Plus:
7.x-1.x-dev

Media Browser Plus 7.x-2.x-dev, gives this error as well when used along with Media 7.x-1.x-dev.

Media:
7.x-2.0-unstable3
7.x-2.x-dev

Don't work at all for me so I can't test them.

darksnow’s picture

I'm not sure this should have been marked as fixed yet.

Any idea when the dev branch will be made into a new release and actually fix this issue for the "stable" code?

Forcing people to use -dev code in production sites isn't really a fix to my mind.

ckopack’s picture

I agree. Everything seems to be working so far for me thanks to those that helped fix this. What is unstable about this module? What do I need to be looking out for on behalf of my users?

Thanks again for posting to help get us back up.

Status: Fixed » Closed (fixed)

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

ckopack’s picture

Not sure if this should be marked fixed either since the fix was to roll back to the beta version. Did a patch make it into a new rc?

EmmyS’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta3
Status: Closed (fixed) » Active

We're seeing this error as well, with an interesting twist: it only occurs when we're logged in as someone other than user 1. User 1 does not get the error.

We're using the following:

Media 7.x-1.0
Media Browser Plus 7.x-1.0-beta3
Media Gallery 7.x-1.0-beta7

zisser’s picture

Same... User 1 is ok all others gets the error...
Media 7.x-1.0
Embedded Media Field 7.x-1.0-alpha1
File entity 7.x-2.0-unstable4
Media: YouTube 7.x-1.0-beta3

Jackinloadup’s picture

Status: Active » Closed (cannot reproduce)

#12 EmmyS & #13 zisser Please check that you are using the latest version of Media

#13 zisser File_entity 2.x should only be used with Media 2.x. For Media 1.x you dont need to install file_entity.

reopen this issue if the issue persists with the latest code.