Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After enabling this module, when I go to edit the Context for a page, I get:
Fatal error: Class 'MediaBrowserPlugin' not found in /opt/development/mpotter/fema_gov/drupal/sites/all/modules/remote_stream_wrapper/RemoteStreamWrapperMediaBrowser.inc on line 8
We are not using the Media module. But it looks like the RemoteStreamWrapperMediaBrowser.inc is getting loaded anyway.
Seems to also happen with "drush fe". Any ideas?
Comment | File | Size | Author |
---|---|---|---|
#31 | remotestreamwrapperissue1.png | 308.14 KB | vlajkop |
#31 | remotestreamwrapperissue2.png | 255.2 KB | vlajkop |
#22 | 1444626-media-disabled.patch | 3.03 KB | Dave Reid |
#14 | 0001-Bug-1444626-Module-should-work-with-Media-module-dis.patch | 5.37 KB | jcisio |
#11 | 0001-Bug-1444626-Module-should-work-with-Media-module-dis.patch | 4.5 KB | jcisio |
Comments
Comment #1
Dave ReidOh interesting. This seems to be a problem with the core class registry because Media is not a dependency for this module, but yet our RemoteStreamWrapperMediaBrowser.inc extends a class that only exists in Media, and we list that file in remote_stream_wrapper.info. Hrmmm.
Comment #2
dogoblack CreditAttribution: dogoblack commentedHello, I have installed the Media and yet still have that problem.
Comment #3
Dave ReidYes, this will happen if you have Media 1.x installed or Media (doesn't matter which version) disabled.
Comment #4
dogoblack CreditAttribution: dogoblack commentedThanks for your reply. I upgraded from Media 1.X to Media 2.unestable and now is functional.
Comment #5
ckopack CreditAttribution: ckopack commentedPhew. Thank you. Media 2 unstable did take care of the job. When I ran update.php it spewed a few dependencies at me. I had to install the file entity module and go into a few module's .info files and delete version dependencies. Now it works. Thank you guys for the help.
Are there any major concerns with this release?
Comment #6
ckopack CreditAttribution: ckopack commentedPS When I try to embed a Youtube video now under the Web tab I get the error: The YouTube video ID is invalid or the video was deleted.
Comment #7
mholve CreditAttribution: mholve commented@ckopack, I had the same problem and had to roll back to the last "alpha" release. Problem solved, for now.
Comment #8
GN CreditAttribution: GN commentedI ran into the "Class 'MediaBrowserPlugin' not found" problem after performing the database update associated with media_youtube 7.x-1.0-beta2 version (which is said to "rebuild themes and formatters").
I think we need to clarify if Remote stream wrapper is dependent on Media or not?
Comment #9
jcisio CreditAttribution: jcisio commentedPerhaps a workaround is to load this inc file in hook_init()?
Comment #10
andyhu CreditAttribution: andyhu commentedSame issue here. Can we put a dependency check in .info file? So if a user install media 1.x they won't be able to enable this module?
dependencies[] = media (2.x)
Thanks!
Comment #11
jcisio CreditAttribution: jcisio commented@andyhu No we can't add a dependency like this. It is not necessary to install a huge module just to use a 7 KB module.
Here is a patch that move Media related function and load them on hook_init() instead of using Drupal's autoload. I didn't test with Media, however.
Comment #12
jcisio CreditAttribution: jcisio commentedComment #14
jcisio CreditAttribution: jcisio commentedThe 'file/add/remote' menu item use a Media plugin access check (I don't know why). But this new patch fix that, too.
Comment #15
morphosis7 CreditAttribution: morphosis7 commentedAm I correct in understanding, from this discussion, that the -beta3 version of remote_stream_wrapper is dependent upon the 2.0-unstable branch of the media module? This would match what I've observed here, but I want to make sure I follow everything correctly. If this is correct, where can I find a discussion about why this step was taken? I'm generally reticent to implement modules in an unstable release, but have not yet looked into why media 2.x has been labelled this way.
Comment #16
jcisio CreditAttribution: jcisio commented@morphosis7: no it is not dependent on Media 2, but it does support Media 2 integration. However, a "bug" in Drupal core turns this integration into dependency.
Comment #17
Shellingfox CreditAttribution: Shellingfox commented@jcisio
The permission callback on hook_menu() still callback to RemoteStreamWrapperMediaBrowser::access, which extends MediaBrowserPlugin. This will make the MediaBrowserPlugin need to load, that mean we still need media module here.
Comment #18
jcisio CreditAttribution: jcisio commented#17 That why I added a check in hook_menu() the latest patch #14 ;-)
Comment #19
VladSavitsky CreditAttribution: VladSavitsky commentedI only want to confirm that beta3 has this bug. Down graded to beta2.
Comment #20
morphosis7 CreditAttribution: morphosis7 commented@19 this is what I'm thinking of doing too - were there any schema changes you had to back out of? I didn't see any, but wanted to confirm.
Comment #21
Dave ReidDowngrading for now should work fine. I am actively trying to fix this today.
Comment #22
Dave ReidPlease test the following patch.
Comment #23
Dave ReidThe patch in #22 was included with http://drupalcode.org/project/remote_stream_wrapper.git/commit/cdc7b0c and is now considered fixed.
Comment #25
vlajkop CreditAttribution: vlajkop commentedThis is still issue. Remote URL is not showing for media 7.x.2. module versions. I have installed next modules: Media 7.x-2.0-unstable3 Remote stream wrapper 7.x-1.0-beta4 . I tried all versions and combinations and it seems that Remote stream wrapper just doesn't support media 7.x.2 module versions.
With stable Media 7.x-1.0 or dev version it is working, but there is issue with modal widow selecting and setting file. When "Remote URL" is used modal window won't close & Javascript error "this.contentWindow.Drupal.media is undefined" is raised. This happen anywhere where remote URL is used. Selecting content using other plugins works fine. Error seems to be in how remote url handles selecting content and using media.popups.js.
Full error: "Timestamp: 4/10/2012 4:30:26 PM
Error: this.contentWindow.Drupal.media is undefined /sites/all/modules/media/js/media.popups.js Line: 103
Source File: xxxxxxxxxx/sites/all/modules/media/js/media.popups.js?v=7.x-1.0+4-dev
Line: 103" Same and for non dev version.
Similar problem is reported here http://drupal.org/node/1396700
Please if someone have ideas about solutions for those issues let me know.
For now I will have to downgrade Media module to 7.x.1 version, but I'm very interested in solution for this.
Comment #26
Dave ReidI've just confirmed the latest Media 7.x-2.x works just fine with Remote stream wrapper 7.x-1.x. If you are trying to display remote images using the Rendered file formatter, then the problem is with #1358860: File Entity won't render image derivatives for images stored using non-local stream wrappers which is a bug in file_entity. Your media browser submission issue should be handled with #1396700: Media Browser "View Library" Submit button redirects back to homepage, instead of closing modal and adding media file and not in this issue. As I've confirmed that this functionality still works, I'm going to mark this back as fixed.
Comment #27
vlajkop CreditAttribution: vlajkop commentedHi Dave,
Thank you for responding so fast.
I'm not sure what is wrong here or what I'm missing, but with all 7.x.2 branch of media and latest Remote stream wrapper 7.x.1.0-beta4 "Remote URL" plugin is not displaying. I have checked couple of times and settings when selecting all plagins, none or Just Remote URL, but result is always the same. There is no Remote URL plugin displayed as option for files. In different drupal installation with same setting if I use Media 7.x.1.x module this plugin is displayed as option when setting files in admin area.
Only thing that I haven't check is setting that says that my field has 2 values. I really don't have idea why this Remote URL is not showing and what may be a reason. Would you please post what modules have you used in your test and how your field was set? Mine is as file, using as formatter media and with settings that has 2 values.
Thank you very much for looking into this. Please let me know if you like some more details.
Comment #28
Dave ReidAh, you need to ensure that your user role has the 'Add media from remote URLs' permission assigned.
Comment #29
vlajkop CreditAttribution: vlajkop commentedAdd media from remote URLs was selected for administrator. I also enable this for all roles, but nothing changed - no luck.
Comment #30
vlajkop CreditAttribution: vlajkop commentedAny other ideas? I can setup new drupal installation on my testing machine and start installing modules from start in order to see when this issue will start appearing. Is there any order of installing modules that is advisable?
Comment #31
vlajkop CreditAttribution: vlajkop commentedAfter installing fresh installation of drupal (http://www.acquia.com/downloads Acquia Drupal 7.12.13) and only next couple of modules:
Chaos tools 7.x-1.0 ; File entity 7.x-2.0-unstable3+21-dev ; Media7.x-2.0-unstable3 ; Media Field7.x-2.0-unstable3 ; Media Internet Sources7.x-2.0-unstable3 ; Remote stream wrapper7.x-1.0-beta4 ; Views7.x-3.3
“Remote URL” plugin is not displayed under admin/content/file or under content type that is using file type with media selector widget.
All file sources & plugins are selected. Account in use in this testing is administrator where this role has access to everything and all permissions are selected.
Please check attached images for more clues.
I'm completely lost and not sure what I'm missing here. Please advice if anyone has any idea how to solve this issue or if some other combination of modules work with remote file please provide a list.
Thanks in advance,
Vlajko
Comment #32
twistor CreditAttribution: twistor as a volunteer commented@vlajkop, The issue reported in the original summary was fixed a while ago. If you're still having problems, please open a new issue.