Closed (fixed)
Project:
Media Gallery
Version:
7.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Mar 2015 at 15:02 UTC
Updated:
17 Oct 2015 at 16:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Mihail.Swetliy commentedI see this error only if a log in the system. If i see it as a quest - i have not problems with view.
Somebody can soled this problem?
Comment #2
socialnicheguru commentedDowngrade the media module.
The js helper functions were removed in the latest media module.
https://www.drupal.org/node/2465057
Comment #3
vulfox commentedYou happen to remember which Media module version?
The module page should be updated with a notice like: "currently works with Media 7.xxxx" or something similar
Comment #4
socialnicheguru commentedThis media version is working for me:
version = "7.x-2.0-alpha4+11-dev"
core = "7.x"
project = "media"
datestamp = "1416423187"
Comment #5
henryhu commented"7.x-2.0-alpha4" of media is working for me.
Comment #6
mautumn commented"7.x-2.0-alpha4" of media is working for me also. The latest dev release (27) wouldn't.
Comment #7
bsains commentedThe last version with - media_attach_browser_js() is - Media version = "7.x-2.0-alpha4+26-dev"
As per the issue here - https://www.drupal.org/node/2454933 - this function was removed.
I've replaced media_attach_browser_js() on line 317 of media_gallery.module with the following and can report all OK.
-media_attach_browser_js($node->content['add_media_link']);
+drupal_add_library('media', 'media_browser');
+drupal_add_library('media', 'media_browser_settings');
As per the patch supplied in the above issue for CkEditor -
https://www.drupal.org/files/issues/Issue_2454933.patch
I'm hesitant to supply a patch as this will need some release co-ordination.EDIT - OK - so just saw dependencies here - Media Gallery 2.x-dev requires Media 2.x-dev - so patch supplied
Comment #8
bsains commentedComment #9
matthiasm11 commentedI can confirm the patch from #8 works, thanks!
Comment #10
apratt commentedI too can confirm the patch in #8 worked well for me.
Comment #11
mallezieThis seems indeed the correct fix.
Comment #12
redeight commented#8 fixed the problem for me. I'm using Media 7.x-2.0-beta1, File Entity 7.x-2.0-beta2, and Media Gallery 7.x-2.x-dev.
Comment #13
kaido.toomingas commented#8 worked for me too.
Comment #14
leolandotan commentedHi guys, I'm using this patch also with Composer through the netresearch/composer-patches-plugin but it fails and gives me this error:
I checked the patch and tried to apply it manually to 7.x-2.x-dev using `git apply -v this-patch.patch` but got the error the the file is corrupted and this patch got applied only through `patch -p0 ...`. I have read that this "style" has been deprecated already as said in Making a Drupal patch with Git. So I just created a patch using the said steps on the guide.
What are your thoughts on this?
Comment #15
kaido.toomingas commentedHey guys I have to admit. I didn't use the patch. I just looked it and reproduced. I guess dev might be changed at some point and it wouldn't work anymore.
Comment #16
nedjoUpdated patch.
Changes:
drupal_add_library().module_load_include()call.Upgrading to critical as without this fix Media Gallery cannot be used with the current stable release of Media 2.x.
Comment #17
brandonc503 commentedok same problem
Call to undefined function media_attach_browser_js() sites/all/modules/media_gallery/media_gallery.module on line 317
so if i can start with ideal modules, which of Media and media gallery are best to start with? ie, can i get ideal modules and not have to patch at all?
cause i just downloaded media 7.x-2.x-dev and media gallery 7.x-2.x-dev hoping to fix and did not
edited*
Media 7.x-2.0-beta1, File Entity 7.x-2.0-beta2, and Media Gallery 7.x-2.x-dev. didnt work
edited*
[SOLVED] comment #16 the patch worked, thanks
Comment #19
moloc commentedCommitted patch. So media_gallery is compatible with the latest stable version of media.
This patch will break compatibility with media versions < 2.x-beta1. So if you use the latest media-gallery 2.x dev, update media too.
See also: https://www.drupal.org/node/2550247
Comment #20
moloc commentedComment #21
moloc commented