Call to undefined function media_browser_js() latest Media-7.x-2.x-dev

milley's picture
milley
Sat, 04/18/2015 - 14:49
#1
Call to undefined function media_browser_js() latest Media-7.x-2.x-dev

Hi,

The media module latest dev version has some changes that affect  md_slider.

The media_browser_js() function have been removed in favour to simplify the media browser settings. It is now handled in a library. Look here: https://www.drupal.org/node/2454933

This cause "Call to undefined function media_browser_js()" in includes/ckeditor.lib.inc line: 294

There is patch:

diff --git a/sites/all/modules/commercial/md_slider/includes/md_slider.utils.inc b/sites/all/modules/commercial/md_slider/includes/md_slider.utils.inc
index 2ab0dfe..07db57f 100644
--- a/sites/all/modules/commercial/md_slider/includes/md_slider.utils.inc
+++ b/sites/all/modules/commercial/md_slider/includes/md_slider.utils.inc
@@ -291,13 +291,8 @@ function _md_slider_include_media_browser_js() {
   }
   $included = TRUE;
   module_load_include('inc', 'media', 'includes/media.browser');
-  $javascript = media_browser_js();
-  foreach ($javascript as $key => $definitions) {
-    foreach ($definitions as $definition) {
-      $function = 'drupal_add_' . $key;
-      call_user_func_array($function, $definition);
-    }
-  }
+  drupal_add_library('media', 'media_browser');
+  drupal_add_library('media', 'media_browser_settings');
   // Add wysiwyg-specific settings.
   $settings = array('wysiwyg_allowed_attributes' => variable_get('media__wysiwyg_allowed_attributes', array('height', 'width', 'hspace', 'vspace', 'border', 'align', 'style', 'class', 'id', 'usemap', 'data-picture-group', 'data-picture-align')));
   drupal_add_js(array('media' => $settings), 'setting');
diff --git a/sites/all/modules/contrib/media b/sites/all/modules/contrib/media
--- a/sites/all/modules/contrib/media
+++ b/sites/all/modules/contrib/media
@@ -1 +1 @@
-Subproject commit 069ba768e69802991401f1031d39a2f5456a276f
+Subproject commit 069ba768e69802991401f1031d39a2f5456a276f-dirty

cindy's picture
cindy
Mon, 04/20/2015 - 00:11

Hi,

Please check your email

We send you the updated version which works with the latest dev version of media 

datendrang's picture
datendrang
Tue, 05/05/2015 - 05:06

hi, could you please send me this version, too? thx

cindy's picture
cindy
Tue, 05/05/2015 - 05:42

Sure Datendrang

Please check your email

nonomm's picture
nonomm
Wed, 05/06/2015 - 03:25

Hi Cindy, I'm experiencing the same issue. Could I get the one which works with the latest media dev module?

Thanks in advance.

cindy's picture
cindy
Wed, 05/06/2015 - 04:55

Sure, please check your email Nonomm

petyosv's picture
petyosv
Sat, 05/23/2015 - 00:42

Hi Cindy. Great slider.
I have the same problem with the latest version of Media. Can you update me too?

cindy's picture
cindy
Sun, 05/24/2015 - 22:28

Please  check your email Petyosv

madman's picture
madman
Wed, 06/03/2015 - 21:08

Please send me update.  I get:

sites/all/modules/contrib/md_fullscreen_slider/inc/md_fullscreen_slider.utils.inc on line 442

Call to undefined function media_browser_js() /....../sites/all/modules/contrib/md_fullscreen_slider/inc/md_fullscreen_slider.utils.inc on line 442 using both media-2.x-dev and media-2.0-alpha4.

phuonght's picture
phuonght
Wed, 06/03/2015 - 22:55

Hi Madman,

We just checked and see you purchased MD Apage. And our Apage uses fullscreen slider but not slider. So we sent to your email an update of fullscreen slider. If you purchased Mega slider please mail back your license key then we can send you update of Mega slider.

madman's picture
madman
Thu, 06/04/2015 - 07:45

Thanks phuonght.

(note: using md_fullscreen_slider)

This still does not work with media 7-2

It calls media_browser_js() which does not exist.

With media-7.1 the admin interface shows all slides on the page

Please advise correct configuration

phuonght's picture
phuonght
Mon, 06/08/2015 - 05:39

Hi Madman,

Check your email again :)

Topaloudis Michail's picture
Topaloudis Michail
Wed, 06/24/2015 - 05:24

Please send me too the newest version

cindy's picture
cindy
Wed, 06/24/2015 - 05:47

Please check your email

kutula's picture
kutula
Thu, 07/23/2015 - 06:58

Hi! i have the same issue with MD Fullscreen Sliders included in BiStream template. Can you please send the the newest version?

cindy's picture
cindy
Thu, 07/23/2015 - 22:35

Sure,

Please check your email Kutula

Goblin Creative's picture
Goblin Creative
Tue, 07/28/2015 - 10:53

I have the same problem Could you send me the update?

regards,

Image title

cindy's picture
cindy
Tue, 07/28/2015 - 22:22

Sure, 

Please check your email Goblin

Wiegand's picture
Wiegand
Wed, 07/29/2015 - 05:47

Would be glad if you send me the update too.
Thanks in advance

cindy's picture
cindy
Wed, 07/29/2015 - 06:23

Hi Wiegand,

Doy you mean MD Slider or MD Full screen slider?

Wiegand's picture
Wiegand
Fri, 07/31/2015 - 10:00

MD Full screen - Part of MD Boom.

Thanks.

cindy's picture
cindy
Sun, 08/02/2015 - 23:09

Please check your email Wiegand

mtrepac's picture
mtrepac
Tue, 08/04/2015 - 07:07

Hi Cindy, I have the same problem in Megamenu (using module Media 7.x-2.0-beta1) Could you send me the update?

Fatal error: Call to undefined function media_browser_js() in C:\inetpub\wwwroot\dominik\sites\all\modules\md_megamenu\includes\md_megamenu.utils.inc on line 627

Thank you

mtrepac's picture
mtrepac
Tue, 08/04/2015 - 09:43

sorry for the previous post, wrong thread ...

phuonght's picture
phuonght
Tue, 08/04/2015 - 23:06

Hi Mtrepac,

Has your problem been solved yet? You can go to http://megadrupal.com/forum/module-support/mega-menu to post your problem but we think you can find a solution at that topic: http://megadrupal.com/forum/module-support/mega-menu/1600

RockOutJamie's picture
RockOutJamie
Tue, 09/01/2015 - 15:23

Also getting Fatal error: Call to undefined function media_browser_js() in /srv/bindings/2216bbfb956f4cc5abb6670b6c3bbcb7/code/sites/all/modules/custom/md_fullscreen_slider/inc/md_fullscreen_slider.utils.inc on line 442

When trying to update edit the full screen slider. Can you send me the update please.

rukkle's picture
rukkle
Wed, 09/02/2015 - 18:09

can you please apply the patch, and provide an updated module in a new install profile so some of us can import just the new module? not everyone knows how to use drush

cindy's picture
cindy
Wed, 09/02/2015 - 23:37

Please check you email

We send you the updated version of MD Slider and MD fullscreen slider

gianluca.glonfoni's picture
gianluca.glonfoni
Thu, 10/08/2015 - 04:22

Please send me too the newest version

cindy's picture
cindy
Thu, 10/08/2015 - 04:29

Please check your email Gianluca.Glonfoni

Halil Yaman's picture
Halil Yaman
Sat, 10/17/2015 - 18:03

Hello,

I have the same "/public_html/modules/md_fullscreen_slider/inc/md_fullscreen_slider.utils.inc on line 442" error

I use latest dev of file_entity and media 2.0 dev

Best regards

phuonght's picture
phuonght
Sun, 10/18/2015 - 22:18

Hi Halil Yaman,

If you mentioned problem about md fullscreen slider, there is a new version that you could download from your account page (http://megadrupal.com/user/halil-yaman). Have you tried with it?

Halil Yaman's picture
Halil Yaman
Mon, 10/19/2015 - 15:52

Is it possible that I can use this module without using your themes?

phuonght's picture
phuonght
Mon, 10/19/2015 - 23:00

Thanks for your concern in our module MD Fullscreen Slider. However, you can not use our module for another theme. It is an illegal usage. Of course, we can not know if you use the module. But, it may conflict with the theme and we will not provide any support or update in that case

Halil Yaman's picture
Halil Yaman
Tue, 10/20/2015 - 02:23

Thanks for the reply. I did not use your Mega Slider modulle. Is this an alternative to MD Fullscreen Slider that can be used with any theme? I am using Adaptivethemes custom theme.

cindy's picture
cindy
Tue, 10/20/2015 - 05:02

We do not sell MD Fullscreen Slider. It is only used in our themes. That's why We can not make sure that our MD Fullscreen Slider can use with any theme. 

Halil Yaman's picture
Halil Yaman
Tue, 10/20/2015 - 06:15

Hi, I've understood and asked if Mega Slider is ok to use instead of MD Fullscreen slider.

Thx 

phuonght's picture
phuonght
Tue, 10/20/2015 - 06:55

Hi,
Please take a look at our Mega slider and check if it is match your use purpose. And remember that mega slider has full-width function but not fullscreen function.

risdataweb's picture
risdataweb
Wed, 02/10/2016 - 12:16

Hey there,

I am having same issue as mentioned here.

Can you please send me updated files for?

phuonght's picture
phuonght
Mon, 02/15/2016 - 00:04

Hi,

please go to your account page (http://megadrupal.com/user/bpadaria) to download new version of fullscreen slider. 

kewin's picture
kewin
Tue, 03/15/2016 - 04:39

Hello,

My slider (version = "7.x-2.16") does't work with edit, giving me the following error:

Fatal error: Call to undefined function media_browser_js() in /var/www/virtual/kewin/drupal7-spdesign.biz/sites/all/modules/contrib/md_slider/includes/md_slider.utils.inc on line 294

Is there an update on this module? If yes, please provide one somehow.

Thank you,

cindy's picture
cindy
Tue, 03/15/2016 - 04:45

Hi Kewin

Please check your email. We send you the latest version of MD Slider

ABO-JDF's picture
ABO-JDF
Fri, 09/02/2016 - 06:51

Hi Cindy,

It appears that I have the same problem on my website which has the 7.x-2.17 version of the MD Slider module installed.

Fatal error: Call to undefined function media_browser_js() in ...\sites\all\modules\custom\md_fullscreen_slider\inc\md_fullscreen_slider.utils.inc on line 442

Can you, please, send me the new version of the module ?

ABO-JDF's picture
ABO-JDF
Fri, 09/02/2016 - 09:02

Nevermind, I downloaded it from my account homepage.

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.