As of Drupal Media module version 2 and 3, there are a lot of modules, contributed or custom which have yet to upgrade its code to complement with Media's major overhaul. Notably, this error I kept encountering with Drupal 7 projects:

Fatal error: Call to undefined function media_include_browser_js() in

To troubleshoot and fix this:

  1. Under your contributed module directory (normally sites/all/modules/), search and find for:
    media_include_browser_js();
     
  2. Backup those modules or file/s to be edited
  3. Comment out that line or lines found, then replace with:
    drupal_add_library('media', 'media_browser');
    drupal_add_library('media', 'media_browser_settings');
​Clear and flush all cache. Refresh page. 
 
Another error might appear:
Warning: include_once(sites/all/modules/media/wysiwyg_plugins/media.inc): failed to open stream: No such file or directory in include_once() (line
To fix this, do the following:
  1. Under the same modules directory, search and find this time for:
    include_once drupal_get_path('module', 'media') . '/wysiwyg_plugins/media.inc';
     
  2. Backup those modules or file/s to be edited, if these are different from above
     
  3. Comment out that line or lines found, the location of the plugin below needs to be updated to:
    include_once drupal_get_path('module', 'media') . '/modules/media_wysiwyg/wysiwyg_plugins/media.inc';
Clear and flush all cache. Refresh page. 
Leave a Comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
To prevent automated spam submissions leave this field empty.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
14 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
Get reliable web hosting services

Recurring donation

Make Donation

  • Other: $

Donate now

Single donation

Make Donation

  • Other: $

Donate now