When using the https://drupal.org/project/media_dev (2.x-dev) to test https://drupal.org/project/dragndrop_upload on simplytest.me, I get the following error when I try to edit the node:
Fatal error: Call to undefined function media_include_browser_js() in /home/sffaff83554c6381/www/sites/all/modules/dragndrop_upload/modules/dragndrop_upload_media/dragndrop_upload_media.module on line 113
This happens on a file or image field that is set to use the Drag & Drop Upload widget when you enable the "Use Media browser" checkbox setting.
Here are the settings that are checked:
The upload method is set to Automatic upload
Show Browse button
Use Media browser
Number of Values = Unlimited
To reproduce:
1. Use https://drupal.org/project/media_dev to test https://drupal.org/project/dragndrop_upload on simplytest.me
2. Edit the article field Image
3. Change the widget to Drag and Drop uploads
4. Set the same settings I used above.
5. Edit the node and see the error
Hope that helps
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | dragndrop_upload-media-2x-support-2237779-9.patch | 948 bytes | mfernea |
| #8 | dragndrop_upload-media-2x-support-2237779-8.patch | 1.36 KB | Zemelia |
Comments
Comment #1
gmclelland commentedIt seems the media_include_browser_js() function doesn't exist in Media 2.x-dev.
I wonder if it instead should be the function media_attach_browser_js(&$element) in media/includes/media.browser.inc
or maybe the function media_browser_js() in media/includes/media.browser.inc?
There is also a media_wysiwyg_include_browser_js() in media/modules/media_wysiwyg/media_wysiwyg.module. This might be what you need?
Hope that helps
Comment #2
webevt commentedHi
Thanks for your report.
Media 2.x moved media_include_browser_js() function into new media_wysiwyg module and renamed it it to media_wysiwyg_include_browser_js(). Using this function will solve the fatal error problem, but media integration will not work anyway. It seems that maintainers have vastly reworked the Media API, so current implementation will not work with this version. I set version restriction dependency for Media module to 1.x, so it will be impossible to use media integration with Media 2.x until I implement it.
Regards
Comment #3
gmclelland commentedGood to know. Thanks for update.
Comment #4
webevt commentedComment #5
rooby commentedMedia 2.x is still changing quite a lot so it's probably best to wait for at least the next recommended release comes out.
Hopefully the next release will be beta.
Comment #6
ttronslien commentedAny plans to revisit this issue in near future?
Comment #7
rooby commentedMedia 2.x is definitely much more stable now.
Comment #8
Zemelia commentedSeems that latest dragndrop_upload dev version is OK with latest Media 2.x
Comment #9
mfernea commentedI can confirm too that the latest dev (7.x-1.0-alpha2+11-dev) + this patch works with media (2.0-beta1). I recreated the patch as it needed correct paths.
Comment #10
mfernea commentedActually it's not working as it should. When the media browser popup is opened the "Library" and "My files" tabs are shown twice.
Comment #11
joseph.olstadlooks like a simple enough patch, very cool would like to try this some time.
Comment #12
lucasantunes commentedHello! I'm currently not able to add a patch file, but here is what worked for me. Hope it helps someone else as well. I got it from the following comment: https://www.drupal.org/project/media/issues/2454933#comment-9737591
Comment #13
amittarkar commented@lucasantunes, the patch you provided worked out of the box but The 'file uri' interface in the media browser is quit cumbersome for the locally stored media files on the pc,So how to have normal browse button like that of Drag and Drop upload ( without media browser) in the media browser itself .
Comment #14
joseph.olstadfor lucasantunes
how to apply a patch