Posted by astutonet on May 23, 2012 at 8:45pm
8 followers
| Project: | Media |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hi!
I'm testing this module with Media: YouTube.
I'm getting the following errors when I try to add a YouTube link:
- http://youtu.be/myurl-aMs could not be added. Only the following types of files are allowed to be uploaded: image
- Warning: simplexml_load_file() [function.simplexml-load-file]: URL file-access is disabled in the server configuration in _media_retrieve_xml() (line 38 of /home/my_site/public_html/sites/all/modules/media/includes/media.xml.inc).
- Warning: simplexml_load_file(https://gdata.youtube.com/feeds/api/videos?q=&max-results=12&start-index...) [function.simplexml-load-file]: failed to open stream: no suitable wrapper could be found in _media_retrieve_xml() (line 38 of /home/my_site/public_html/sites/all/modules/media/includes/media.xml.inc).
I can't add the link...
Searching for related issues, I found this, with FB Social Plugin Integration.
Maybe, we can uses the same solution.
Tks.
Comments
#1
Nothing to do?
As the module don't work as desired, priority reassessed.
#2
Tks
#3
Considering that you're the first to report this, let's settle on major.
#4
This is happening with me as well.
Media
7.x-2.0-unstable5+1-dev
Media: YouTube
7.x-2.0-alpha2
#5
If I enter the name of the YouTube user in the Media browser search field, the error goes away.
#6
Also seeing this issue, with Media: Youtube 2.0-alpha2 and Media 2.0-unstable6.
To be clear, for me this comes up at the top of the media browser modal whenever I'm trying to add a Media file in CKEditor (even if I haven't clicked to the Web or Youtube tabs yet), and doesn't go away no matter what I'm doing in that modal. And unsurprisingly, the "search" in the Youtube tab never gets any results.
#7
The problem is that calling simplexml_load_file on a remote file requires allow_url_fopen to be enabled in PHP configuration. Many people are going to have this disabled for good reason so relying on it is inadvisable. Patch attached to replace that line with a drupal_http_request followed by a simplexml_load_string.
#8
Works for me.
#9
Marked #1772418: MEdia fails to import video behind proxy as a duplicate.
#10
The patch in #7 applied cleanly and successfully allowed Media to retrieve information over HTTP in an environment where
allow_url_fopenis disabled.This change also allows Media to retrieve information through a firewall (useful for corporate users) since #7881: Add support to drupal_http_request() for proxy servers has been committed.
#11
awesome, i like the proxy part:)
commited
#12
Needs backport to 1.x though
#13
same patch applies on 1.x , commited
#14
Automatically closed -- issue fixed for 2 weeks with no activity.