After updating of Media module to the latest version (7.x-2.0-beta1), I've got fatal error while opening node for editing:

Fatal error: Call to undefined function media_attach_browser_js() in D:\dev\OpenServer\domains\bla-bla\sites\all\modules\contrib\media_multiselect\media_multiselect.module on line 98

That is because media_attach_browser_js() function was removed from media module, and it can be replaces with simple drupal_add_js().

Here is a patch for fixing that.

Comments

tracker2k’s picture

Status: Active » Needs review
miroslavbanov’s picture

Category: Task » Bug report
Priority: Normal » Major

Have the same problem. Fatal error with latest stable media module.

Maybe the patch should be adjusted to attach library to the render array:

  $element['#attached']['library'][] = array('media', 'media_browser');
  $element['#attached']['library'][] = array('media', 'media_browser_settings');
joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

works for us on an older version, but this issue appears to be a duplicate issue, there's another one open same situation

joseph.olstad’s picture

Status: Reviewed & tested by the community » Needs review

still testing

a.milkovsky’s picture

Status: Needs review » Closed (duplicate)
Related issues: +#2216273: Latest media changes break the multiselect

This patch is a part of https://www.drupal.org/node/2216273#comment-10314915
Let's close this issue as a duplicate.

joseph.olstad’s picture

Yes thanks