After the latest update from the Media module (not media_gallery) there is a fatal error.
Fatal error: Call to undefined function media_include_browser_js() in ..../.../.../httpdocs/modules/media_gallery.module on line 361
There was a change in the latest Media module what is the course of this.
After changing line 361 from the media_gallery.module
- media_include_browser_js();
+ media_attach_browser_js($elements);
The media browser is launched and from the library the file is inserted but when uploading a picture this is not uploaded at all (the last part could be a Media module bug)
Comments
Comment #1
KeesMK commentedSorry for the inconvenience when this is posted on the wrong place but with an older development module from the Media module it worked.
I am sorry i am not a php programmer but did some testing the above change in the code is as far my knowledge is the only way to get the upload screen lauch and without an error message.
Comment #2
sol roth commentedIn the new media module the function media_include_browser_js() was replaced by function media_browser_js(), so if you change line 361 on the media gallery module from
"media_include_browser_js();"
to
"media_browser_js();"
The fatal error goes away, but this is not a fix, just a way to get around the fatal error to work more on the problem.
I'm using version media 7.x-1.x-dev and media gallery 7.x-1.0-beta3
Comment #3
KeesMK commentedThanks for the suggestion solomonrothman the fatal error is indeed gone but the popup screen to select files is not showing.
BTW using the same versions where the Media module is the most recent build.
Comment #4
JacobSingh commentedfixed! thanks :)
Comment #5
KeesMK commentedSorry it is not fixed both the Fatal error gone but one suggestion brings up the UPLOAD screen where is is not possible to upload a picture the other is not showing the popup screen at all.
Comment #6
sol roth commentedMy post was not a fix, only a quick way to get past the fatal error to work more on the actual problem. I should have stated that earlier, it will allow you to view your galleries, but the add media functionality does not work. The gallery module needs a real update, not a hack.
Comment #7
JacobSingh commentedhuh, it's working fine for me with plupload and single file.
I added KeesMK's btw.
Comment #8
KeesMK commentedAgree Media gallery is on beta fase and not quite ready. For now it is fine work from the programmers and most of it allready works thanks for that. And agree the change of code the first try it did not but indeed works.
Comment #9
KeesMK commentedComment #10
kenheim commentedI concur with KeesMK, it dos NOT seem to be entirely fixed. I applied solomonrothman's fix in #2 and the Fatal error did go away, but the +Add media link (http://mysite.com/media/browser?render=media-popup) is not functioning. I got nothing.
So unless I'm missing something?
Comment #11
kenheim commentedSorry, looks like I was missing something: http://drupal.org/node/1053002
Comment #12
kbell commentedI'm sorry - I don;t understand how #10 and #11 demonstrate that this problem is fixed, and the fix did not help me (yet - maybe I'm getting something wrong though?).
I have clean URLs enabled, which is what is referenced in #11 above as the "missing something" (http://drupal.org/node/1053002), but I am having the exact same problem as the others here, and before I enabled the latest dev versions for the media, media_gallery and media_youtube modules, all my video files had disappeared (stopped showing up on the Gallery pages they were showing on before).
The error I'm receiving is:
Fatal error: Call to undefined function media_include_browser_js() in /mysite.com/sites/all/modules/media_gallery/media_gallery.module on line 361, and this is after deleting the previous module version and installing today's dev release (3/4/2011). Update.php encountered diffs and ran for all three modules, with no serious watchdog errors. But when I look at my Gallery page, all the videos are gone, and the error above is all I have.Anyone have any thoughts as to what I can do next?
Thanks,
Kelly
Comment #13
kbell commentedSorry - I clicked "needs review" by mistake.
Comment #14
Jackinloadup commentedsame as kbell #12
Still not working for me.
Comment #15
kbell commentedIf anyone wants to see the problem I'm having in action, please see http://commonslearningalliance.org/content/videos-commons
This page is supposed to have 18 videos on the page, and the other two Galleries havve 4 and 1, respectively. Client is getting desperate, and I still haven't been able to figure out what the deal is.
One interesting thing that also happens is that, after uploading the latest version of dev for media and media_gallery, these video Gallery pages also DO NOT load the theme - all the other site pages load the theme but not the Video pages. This is NOT SHOWN on the link above, but is in my local - I am not working on the production site until I have a solution.
Any help appreciated.
Thanks,
Kelly
Comment #16
tsvenson commentedI just updated to the latest dev version of the media gallery and styles modules and this now works without any patches for me.
Comment #17
kbell commentedJust to clarify - I have updated to the latest-available media gallery dev (dated 7.x-1.0-beta3 tar.gz (288.78 KB) | zip (296.4 KB) 2011-Jan-17) and styles' latest dev as well (7.x-2.x-dev tar.gz (70.15 KB) | zip (79.63 KB) 2011-Mar-10), and I am still having the same problem (and some new ones, but those go on a different queue :).
Comment #18
stoltoguzzi commentedsame problem here, error about
Fatal error: Call to undefined function media_include_browser_js
is going away but "add image" does not work anymore.
Have the latest dev-Version, any other fix I can do?
Comment #19
kkstudio commentedI've fixed this problem !!!
I pasted the followeing code into media.browser.inc file,
between function media_attach_browser_js(&$element) and function media_browser_js()
This file is in the directory: your_directory/sites/all/modules/media/
I hope that will work not only with my plroblem :)
Comment #20
stoltoguzzi commentedThank you for thsi code, but it does not solved my problem.
Made another call: http://drupal.org/node/1098684
Comment #21
David_Rothstein commented@stoltoguzzi, your issue seems unrelated to this one.
There was a problem with the patch committed here. It makes Media Gallery work with the latest Media 7.x-1.x code, but breaks it for Media 7.x-1.0-beta3 (the last official release). I think that is probably the source of some of the problems reported above.
So before we release the next beta, I'm planning to commit the attached patch as a temporary measure, which will make it work with either version.
Comment #22
David_Rothstein commentedhttp://drupalcode.org/project/media_gallery.git/commit/09c3a6b
Comment #24
kenheim commentedI'm reactivating this issue since I am getting the "Fatal error: Call to undefined function media_include_browser_js() in mysite/sites/all/modules/media_gallery/media_gallery.module on line 370."
I have the the 4/11 7.x-1.x-dev version of the media module and the 7.x-1.0-beta4 version of media gallery installed.
My understanding from #21 is that the patch was committed prior to the release of 7.x-1.0-beta4. So, it doesn't appear to be working with the latest dev version of the media module.
Comment #25
JacobSingh commented#1122330: Media module moved files around, need to update references
Comment #27
JMC_in_CH commentedHey, Just want to document my experience with this error message.
I deleted on the file system the IMCE module (just an error!) and was no more able to get it back after installation in the Media module list.
The CDKeditor was then breaking any edit attempt, returning the error message "undefined function media_browser_js() in d77/sites/all/modules/ckeditor/includes/ckeditor.lib.inc on line 696".
I installed therefore the Media module itself and got the ICME back (configured and enabled).
Everything seems to be OK now.
Comment #28
JMC_in_CH commentedSo, it should be an error in Drupal Version 7.7 ... but a very minor one, exactly the ones which disappoint the newbies.
Consider my first post on August 21, 2011 at 6:03pm.
Before the error, there was only 1 module in the media list = ICME.
Error = I deleted the files (ICME directory) because was trying to get linkit working with FCEditor and only the DEV versions of the 3 packages are required!!!
Bug = The display engine did not find any media module and erased therefore the media list from the module list. No further check. But all configuration (activation, ...) for ICME are still registered.
Bug = New installation was not verbose at all but media list still does not display
To force the display of the media list, I installed another module from the list. No way to find out which module is where: So I took the media module for the media list (!!! that s just luck that such a module was defined !!!)
See you
JMC
Comment #29
moloc commentedThis issue was fixed in April.
JMC_in_CH: you write about media, imce, ckeditor, fckeditor, .... but not about media_gallery. This issue is fixed in media_gallery. If you have this issue with the latest version of another module, you should fill an issue in the specific module-issue queue.
If you still have a issue with media_gallery, create a new issue.
So i close this again.
Comment #30
MKorostoff commentedComment #31
MKorostoff commentedComment #32
MKorostoff commentedComment #33
MKorostoff commentedComment #34
MKorostoff commentedComment #35
MKorostoff commentedSo sorry for the comment spam on this issue, I think my password manager thinks that "title" field is a username field
Comment #36
rockspeeder commentedHi All,
I just fixed it by copying 7.x-1.5 version files into below path :public_html/sites/all/modules/media and removed :7.x-2.0-beta1 version .
In 7.x-2.0-beta1 version this folder was not places correctly ' wysiwyg_plugins' which is called using below code of rotating_banner.admin.inc file....
include_once drupal_get_path('module', 'media') . '/wysiwyg_plugins/media.inc'; at line number 33.
Let me know if any one needs more info.
Comment #37
tpsiru commentedChange:
include_once drupal_get_path('module', 'media') . '/wysiwyg_plugins/media.inc';
to
include_once drupal_get_path('module', 'media') . '/modules/media_wysiwyg/wysiwyg_plugins/media.inc';
and
comment line
media_include_browser_js();
then add these 2 lines
drupal_add_library('media', 'media_browser');
drupal_add_library('media', 'media_browser_settings');
Comment #38
ahmedchebil commented#37 fixed it for me
Thank you tpsiru