Working with latest version of Media module

paulmkellam's picture
paulmkellam
Mon, 03/31/2014 - 14:38
#1
Working with latest version of Media module

I recently updated the media (7.x-2.0-alpha3+77-dev) and file_entity (7.x-2.0-alpha3+15-dev) modules to their latest versions (as required to get those working with media_vimeo).

Afterward, when I went to edit an existing megamenu (admin/structure/md-megamenu/1/edit), the site showed only the following messages instead of the edit page:

Warning: include_once(sites/all/modules/media/wysiwyg_plugins/media.inc) [function.include-once]: failed to open stream: No such file or directory in md_megamenu_edit_links_form() (line 1028 of .../sites/all/modules/md_megamenu/includes/md_megamenu.admin.inc).
Warning: include_once() [function.include]: Failed opening 'sites/all/modules/media/wysiwyg_plugins/media.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in md_megamenu_edit_links_form() (line 1028 of .../sites/all/modules/md_megamenu/includes/md_megamenu.admin.inc).

Searching for possible fixes, I realized that the wysiwyg_plugins directory that is referenced had been removed as part of changes to the media module and found a similar issue reported with another module: rotating_banner (see https://drupal.org/comment/4234472#comment-4234472) suggesting a change to that module's admin.inc file on the line reporting the issue.  The same line in md_megamenu.admin.inc is the one referenced in the warnings above (line 1028).

I updated line 1028 accordingly from:
    include_once drupal_get_path('module', 'media') . '/wysiwyg_plugins/media.inc';
to:
    include_once drupal_get_path('module', 'media') . '/includes/media.browser.inc';

and then encountered a WSOD and an entry in the PHP error log showing:
PHP Fatal error: Call to undefined function media_include_browser_js() in .../sites/all/modules/md_megamenu/includes/md_megamenu.admin.inc on line 1029

I also found an issue for CKEditor, where a patch was required for compatiblity with the latest Media module version.  Both cases indicate that modules that integrate with Media require updating.

Do you have a patch for this issue yet, or can you now suggest how it can be fixed?

cindy's picture
cindy
Tue, 04/01/2014 - 23:49

Hi,
Firstly, thanks for your concern in our product
However, We currently do not support media-dev version.
Regards,

paulmkellam's picture
paulmkellam
Wed, 04/02/2014 - 23:58

Well, that's a disappointing change to yesterday's note that it was being worked on.

Can you not offer some suggestion, or timing of when this will be addressed?

cindy's picture
cindy
Thu, 04/03/2014 - 23:57

Hi,
We currently do not support media-dev.
However, We will check it for you and feedback by tomorrow or the day after tomorrow.
Regards,

cindy's picture
cindy
Sun, 04/06/2014 - 10:59

Hi,
Sorry for replying late.
Please Enable module media_wysiwyg
Replace media_include_browser_js() with media_wysiwyg_include_browser_js();
And then comment or remove the line include_once drupal_get_path('module', 'media_wysiwyg') . '/wysiwyg_plugins/media.inc';
Regards,

paulmkellam's picture
paulmkellam
Sun, 04/06/2014 - 21:16

It's now working based on your advice. I had the media_wysiwyg menu enabled already, but replaced the ...browser_js call as suggested (line 1029) and commented out line 1028.

Thank you.

jimrandell's picture
jimrandell
Wed, 04/30/2014 - 17:45

That worked for me too. I was getting a bit nervous about this.

BUT I would like to add that I am new to development, and were I to read this thread a month ago, I would have struggled mightily (and perhaps failed) in attempting to implement this fix.

Might I suggest posting a revised version of the md_megamenu.admin.inc file?
it might not help the totally uninitiated, but it would reach a broader scope of those in need of this fix.

I do sincerely thank you for your assistance! I hope you don't take this any other way, I just want to return the favor and help others with this issue.
-JR

drupalknight's picture
drupalknight
Wed, 05/07/2014 - 12:48

paulmkellam:
Could you outline the procedure you followed to upgrade 7.x-2.0-alpha3+77-dev.
I am trying to find a procedure to upgrade from 7.x-1.x-dev to 7.x-1.4. But I haven't found any way to do so.
Thanks.

Drew Scurachio

wolf.zirbs's picture
wolf.zirbs
Mon, 10/13/2014 - 11:55

Thanks to All. I could solve the issue following those instruction. That save me a bit of time.
But when will the MD-Mega-Menu Module updated for this issue?

monsterweb's picture
monsterweb
Tue, 11/11/2014 - 09:59

This is still a problem and a terrible solution to suggest hacking/modifying the paid module to get something to work. The latest version of Media module is 7.x-2.0-alpha4 which includes the Media WYSIWYG submodule. What are the instructions to get this working properly now?

The exact error being output is as follows:
Fatal error: Call to undefined function media_include_browser_js() in /home/[client_account]/public_html/sites/all/modules/md_slider/includes/md_slider.admin.inc on line 474

Please advise MegaDrupal staff. Thanks!!

Dods Design's picture
Dods Design
Mon, 12/01/2014 - 03:56

Has there been any progress on this? I've recently purchased this module and am horrified to learn that we have to hack module files to get this to work and even then it doesn't guarantee that the fix works.

Like monsterweb I too have to use the 7.x-2.0-alpha4 due to another module relying on it and I appreciate and respect that you don't support alpha or beta versions of the media module but asking us to hack something we've paid for is a bit much especially as the problem seems to have existed for 5 months with no further reply from your team.

cindy's picture
cindy
Wed, 12/03/2014 - 21:23

Hi,
We are working on this issue and will update at the soonest time

Dods Design's picture
Dods Design
Thu, 12/04/2014 - 09:56

Thank you for the reply but do you have an estimated timeline for this to be fixed? This module is important to the project we are working on and without knowing when we can expect to see a fix for this we'll have to look for a full refund and an alternative solution.

Thanks.

tomgrant1310@gmail.com's picture
tomgrant1310@gm...
Thu, 12/11/2014 - 15:33

I too am receiving this error:
Fatal error: Call to undefined function media_include_browser_js() in /home3/tomg8371/public_html/dev/**/sites/all/modules/md_megamenu/includes/md_megamenu.admin.inc on line 1029

In the middle of a project.

Is there a fix for this?

Thanks

Tom

wolf.zirbs's picture
wolf.zirbs
Thu, 12/11/2014 - 22:05

#Tom Grant > look at the first Post above from paulmkellam. If it does not work then is a new BUG, Sorry I'm waiting to for an update. Regards

tomgrant1310@gmail.com's picture
tomgrant1310@gm...
Fri, 12/12/2014 - 02:36

This fixed the problem but would appreciate an updated module.

cindy's picture
cindy
Tue, 12/16/2014 - 05:45

Hi all,
We sent all of you the updated version of Mega Menu
Please check your email

codeinprogress's picture
codeinprogress
Thu, 01/08/2015 - 12:29

Hi, did you made an updated version of your custom modules?
I have just installed the theme, I updated all the modules to stable version (with also media), and I still have the same issue.

Thank you!

cindy's picture
cindy
Thu, 01/08/2015 - 22:27

Hi,
yes, please download the updated version 7.x-1.16

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.