I just used drush to update media to the dev version released 2/16/2011. Now, I can't add or edit slides. It gives me this error:

Fatal error: Call to undefined function media_include_browser_js() in /mypath/sites/all/modules/rotating_banner/rotating_banner.admin.inc on line 35

It doesn't put the error in the Drupal messages section, it blanks everything but the error. View source gives me this:

<br /> 
<b>Fatal error</b>:  Call to undefined function media_include_browser_js() in <b>/var/www/vhosts/drupal/dev/sites/all/modules/rotating_banner/rotating_banner.admin.inc</b> on line <b>35</b><br /> 

I tried disabling and re-enabling media and rotating banner. I also cleared the cache several times.

What other information can I give you to help resolve this problem?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JacobSingh’s picture

I put in a stop-gap, but really the new include has a fairly illogical path (/wysiwyg_plugins/media.inc).

Marking as needs work, even though the committed should work, please let me know either way.

Myriam974’s picture

+1
Fatal error: Call to undefined function media_include_browser_js() in I:\www\sites\all\modules\rotating_banner\rotating_banner.admin.inc on line 35

function rotating_banner_slide_form($form, &$form_state, $banner, $slide = NULL) {
global $base_url;
$slide_defaults = RotatingBannerSlide::getDefaultSettings();
include_once drupal_get_path('module', 'media') . '/wysiwyg_plugins/media.inc';
media_include_browser_js(); <-- line 35

JacobSingh’s picture

You need to update the version of media (and styles) you are using I think.

jerrac’s picture

I'll be testing the update tomorrow when I get back to work. I have Presidents Day off. :D

jerrac’s picture

Status: Active » Fixed

And it is fixed. Thanks!

Status: Fixed » Closed (fixed)

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

interaxsys’s picture

Status: Closed (fixed) » Needs review

I have just installed a fresh instance of Drupal 7. I am trying to get the rotating_banner working and have installed the media module and ran an update.

The error described has occurred and I'm up to date!! Any advice?

bryancasler’s picture

subscribe

rinodods’s picture

Check in sites/all/modules/rotating_banner and look at the rotating_banner.admin.inc file. Find the lines that read:

include_once drupal_get_path('module', 'media') . '/wysiwyg_plugins/media.inc';
media_include_browser_js();

Replace with:

include_once drupal_get_path('module', 'media') . '/media.browser.inc';
media_include_browser_js();

I had the same issue starting about the same time and this fixed my problem.

pazap47’s picture

yes seems to work thanks if any problems will let you know again thanks

electroponix’s picture

I have the same problem, but the fix in #9 didn't work. Almost. gives me this error behind a gray overlay. sites/all/modules/styles/styles.module on line 512

james.elliott’s picture

There have been some major reorganizations of the media and styles module. This module needs to update its dependencies so that it will work with the new versions of those modules. See #1122334: Media module moved files around, need to update references

luisdesig’s picture

replace

include_once drupal_get_path('module', 'media') . '/media.browser.inc';
media_browser_js();

to

include_once drupal_get_path('module', 'media') . '/includes/media.browser.inc';
media_browser_js();

califsurferboy33’s picture

Hello,

I replaced:

include_once drupal_get_path('module', 'media') . '/media.browser.inc';
media_include_browser_js();

To

include_once drupal_get_path('module', 'media') . '/includes/media.browser.inc';
media_browser_js();

And the create banner screen started working but nothing happens when I click the, "Choose Banner Image Link"

Thanks.

todos27’s picture

I'm in the same situation as califsurferboy33. Does anyone have a solution to this problem?

I changed the same code and now no error is display :) but I just can't add an image to the slide show, so doesn't work.

Thanks in advance for your help.

todos27’s picture

I solved my problem. I download a site from drupal gardens and exporting to my site both modules (media and rotating_banner) from the downloaded drupal gardens site.

califsurferboy33’s picture

That's awesome! Would you mind going into a little bit more detail on how I would do that? Thanks!

califsurferboy33’s picture

Never Mind! Got it! Thanks and Great Find!

Anonymous’s picture

@rinodods Your solution in #9 worked for me. Thank you.

Jayson Wonder’s picture

I go into add a banner image and select library. I see nothing in my library.

What is the default location that library seaches? Where should I have the images?

They are currently in ../sites/default/files/images/banners

Thanks for any advice.

kscott22’s picture

I tried the suggestion in #9, but I'm still getting the WSOD when I try to configure any existing rotating banner or to add more than one slide to a new banner. I'm using the most up-to-date versions of all modules (media 7.x-1.0-beta5 and Rotating Banner 7.x-1.x-dev). The problem began after updating Media to beta5.

kscott22’s picture

This patch worked for me: http://drupal.org/node/1160786

YuvalBH’s picture

on case wysiwyg is installed

Check in sites/all/modules/rotating_banner and look at the rotating_banner.admin.inc file. Find the lines that read: include_once drupal_get_path('module', 'media') . '/media.browser.inc';

and change it back to: include_once drupal_get_path('module', 'media') . '/wysiwyg_plugins/media.inc';

you can verify it by simply browse to the file, and make sure the function is there

LeDucDuBleuet’s picture

Version: 7.x-7.x-dev » 7.x-2.x-dev
Issue summary: View changes
FileSize
647 bytes

With the media module version 7.x-2.0-alpha4, this has changed again...

You have to enable the new Media sub-module called "Media WYSIWYG" and configure it at admin/config/media/browser.

And in the file "rotating_banner.admin.inc", you have to replace the lines :

  include_once drupal_get_path('module', 'media') . '/wysiwyg_plugins/media.inc';
  media_include_browser_js();

By :

  media_wysiwyg_include_browser_js();

I created a patch against latest version 2.x-dev.

Amad Tababa’s picture

LeDucDuBleuet, Works smoothly. Thanks

TwoD’s picture

ricovandevin’s picture

Status: Needs review » Needs work

#26 Needs a patch.

ricovandevin’s picture

Status: Needs work » Needs review
FileSize
961 bytes

Patch against latest dev attached.

Niek_Kloots’s picture

I can confirm that it work with:

rotating_banner-7.x-2.x-dev https://www.drupal.org/project/rotating_banner/releases/7.x-2.x-dev
media-7.x-2.0-rc3 https://www.drupal.org/project/media/releases/7.x-2.0-rc3

and the following modules enabled:
ctools-7.x-1.12
file_entity-7.x-2.0-beta3
views-7.x-3.14

Niek_Kloots’s picture

Status: Needs review » Fixed
LeDucDuBleuet’s picture

Status: Fixed » Patch (to be ported)

I can also confirm the patch is working well with current dev.

Thank you!

LeDucDuBleuet’s picture

Status: Patch (to be ported) » Reviewed & tested by the community
Niek_Kloots’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

DavidoffC’s picture

Have installed the latest version of modules
- media 7.x-2.0
- rotating banner 7.x-2.x-dev

Also did as instructed under #29, but still not working as it should.
Media WYSIWYG module is enabled.

When I try adding a new banner image in rotating banner module, i get the following error message:
'PHP Fatal error: Call to undefined function media_browser_js() in /var/www/vhosts/www.somedomain.com/httpdocs/sites/all/modules/media/wysiwyg_plugins/medi... on line 53, referer: http://www.somedomain.com/admin/structure/block/manage/rotating_banner/2...'

This started after the latest update to the media 7.x-2.0 module.

Are there any solutions to this issue?

Niek_Kloots’s picture

I use this module with all the changes included (also target=_blank) rotating_banner-7.x-2.0.zip works like a dream.

Works with the latest media module media 7.x-2.0
You also need module file_entity 7.x-2.0-beta3

shinz83’s picture

I confirm that #28 patch works for Rotating Banner 7.x-2.x-dev and Media 7.x-2.14.

Dev_sayed’s picture

Hi All If you face any problem that generate the same issue it means it used old way to call the media browser
my fix is :
you need to change this :
include_once drupal_get_path('module', 'media') . '/wysiwyg_plugins/media.inc';
media_include_browser_js();
to
include_once drupal_get_path('module', 'media') . '/includes/media.browser.inc';
media_browser();