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?
Hi,
Firstly, thanks for your concern in our product
However, We currently do not support media-dev version.
Regards,
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?
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,
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,
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.
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
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
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?
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!!
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.
Hi,
We are working on this issue and will update at the soonest time
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.
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
#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
This fixed the problem but would appreciate an updated module.
Hi all,
We sent all of you the updated version of Mega Menu
Please check your email
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!
Hi,
yes, please download the updated version 7.x-1.16