Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
#28 | make-rotating-banner-work-with-media-7.x-2.0-1066350-28.patch | 961 bytes | ricovandevin |
Comments
Comment #1
JacobSingh CreditAttribution: JacobSingh commentedI 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.
Comment #2
Myriam974 CreditAttribution: Myriam974 commented+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
Comment #3
JacobSingh CreditAttribution: JacobSingh commentedYou need to update the version of media (and styles) you are using I think.
Comment #4
jerrac CreditAttribution: jerrac commentedI'll be testing the update tomorrow when I get back to work. I have Presidents Day off. :D
Comment #5
jerrac CreditAttribution: jerrac commentedAnd it is fixed. Thanks!
Comment #7
interaxsys CreditAttribution: interaxsys commentedI 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?
Comment #8
bryancasler CreditAttribution: bryancasler commentedsubscribe
Comment #9
rinodods CreditAttribution: rinodods commentedCheck 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.
Comment #10
pazap47 CreditAttribution: pazap47 commentedyes seems to work thanks if any problems will let you know again thanks
Comment #11
electroponix CreditAttribution: electroponix commentedI 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
Comment #12
james.elliott CreditAttribution: james.elliott commentedThere 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
Comment #13
luisdesig CreditAttribution: luisdesig commentedreplace
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();
Comment #14
califsurferboy33 CreditAttribution: califsurferboy33 commentedHello,
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.
Comment #15
todos27 CreditAttribution: todos27 commentedI'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.
Comment #16
todos27 CreditAttribution: todos27 commentedI 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.
Comment #17
califsurferboy33 CreditAttribution: califsurferboy33 commentedThat's awesome! Would you mind going into a little bit more detail on how I would do that? Thanks!
Comment #18
califsurferboy33 CreditAttribution: califsurferboy33 commentedNever Mind! Got it! Thanks and Great Find!
Comment #19
Anonymous (not verified) CreditAttribution: Anonymous commented@rinodods Your solution in #9 worked for me. Thank you.
Comment #20
Jayson Wonder CreditAttribution: Jayson Wonder commentedI 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.
Comment #21
kscott22 CreditAttribution: kscott22 commentedI 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.
Comment #22
kscott22 CreditAttribution: kscott22 commentedThis patch worked for me: http://drupal.org/node/1160786
Comment #23
YuvalBH CreditAttribution: YuvalBH commentedon 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
Comment #24
LeDucDuBleuet CreditAttribution: LeDucDuBleuet commentedWith 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 :
By :
I created a patch against latest version 2.x-dev.
Comment #25
Amad Tababa CreditAttribution: Amad Tababa commentedLeDucDuBleuet, Works smoothly. Thanks
Comment #26
TwoDHere's how to fix it and keep backwards compatibility: #2434169-7: Regression: dropping media attach function breaks modules that use Media without media FAPI field
Comment #27
ricovandevin CreditAttribution: ricovandevin at Finlet commented#26 Needs a patch.
Comment #28
ricovandevin CreditAttribution: ricovandevin at Finlet commentedPatch against latest dev attached.
Comment #29
Niek_Kloots CreditAttribution: Niek_Kloots as a volunteer commentedI 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
Comment #30
Niek_Kloots CreditAttribution: Niek_Kloots as a volunteer commentedComment #31
LeDucDuBleuet CreditAttribution: LeDucDuBleuet as a volunteer commentedI can also confirm the patch is working well with current dev.
Thank you!
Comment #32
LeDucDuBleuet CreditAttribution: LeDucDuBleuet as a volunteer commentedComment #33
Niek_Kloots CreditAttribution: Niek_Kloots as a volunteer commentedComment #35
DavidoffC CreditAttribution: DavidoffC commentedHave 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?
Comment #36
Niek_Kloots CreditAttribution: Niek_Kloots as a volunteer commentedI 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
Comment #37
shinz83 CreditAttribution: shinz83 commentedI confirm that #28 patch works for Rotating Banner 7.x-2.x-dev and Media 7.x-2.14.
Comment #38
Dev_sayed CreditAttribution: Dev_sayed commentedHi 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();