I'm using D7 and the latest Feeds to pull videos from youtube. These videos are only embedded using the latest version of Oembed and I do not store them locally.
After I've read that the Media Asset field is being deprecated in favor of Drupal's File Field I decided to switch the field type I'm using to display these youtube videos from Multi Media Asset to File Field.
But now when I try to import a video the same way I did before (using an http crawler and xpath praser) I get this error code:
"Invaild Enclousre Error"
Checking the log messages for the error it seems that the server is trying to copy the file locally:
The specified file temporary://filC28B.tmp could not be copied to public://films/view_play_list?p=PLF66F466F51CCFAB4
After I've examined the "Media Asset Field"setup that I've used to pull and display embedded videos from 3rd parties
I'm not sure if this is a bug or perhaps there is a need for another module such as http://drupal.org/project/media_feeds to tell feeds importer not to try and download locally.
Comment | File | Size | Author |
---|---|---|---|
#3 | feeds-bad_file_destination_for_enclosures-1482530.patch | 593 bytes | dman |
Comments
Comment #1
dman CreditAttribution: dman commentedThis may be related to the extra characters in the filename that can't be saved safely on a local filesystem without tranliteration or something.
OTOH, I got this message for a different reason - I spotted an error in
FeedsParser.inc:FeedsEnclosure:getFile() which triggers if you've defined a subdirectory for your filefield.
Should be
It was borking each of my imports, as one of the last thing I did after 3 days working on a perfect data import was to make sure that the files directory being used was a tidy one.
MAY not be the same issue for you, but it DID give me the errors
"Invalid enclosure http://example.com/getattachment/3f7abf83-9844-436f-b859-40ca5023bea2/Fi..."
"File temporary://fileO8bE2f could not be copied, because the destination directory public://imagespublic://images is not configured correctly."
Comment #2
dman CreditAttribution: dman commented(I see the bug I found has been fixed in -dev)
Comment #3
dman CreditAttribution: dman commentedPlease ignore, I'm just dropping this patch here as an interim measure for a makefile for a distro I'm building - don't want to rely on feeds -dev yet
Comment #4
mirzu CreditAttribution: mirzu commentedpatch in #3 works for me.
Comment #5
twistor CreditAttribution: twistor commentedAs stated in #3, this was already fixed. The patch is there for posterity. The original issue is still active, however, I don't think there's any problem creating files with ?= in them. My thorough testing includes
$ touch "view_play_list?p=PLF66F466F51CCFAB4"
.Comment #6
MrPeanut CreditAttribution: MrPeanut commentedI'm not having this same exact problem, but it's related, so I'm hoping someone can help.
I had an embedded media field (all YouTube links) in Drupal 6. I'm trying to import those into Drupal 7 as a filefield. I thought I'd be able to just put the YouTube URL in my "video" field, but that doesn't seem to work. Do I have to use the Media Feeds module?
Comment #7
SilviaT CreditAttribution: SilviaT commentedSame problem for me.
Patch #3 worked for me too.
Comment #8
roynilanjan CreditAttribution: roynilanjan commentedCan u please tell me when trying to apply in alpha version unable to apply patch
patch -p1 < /srv/www/236/feeds-bad_file_destination_for_enclosures-1482530.patch within feed directory,
gives
patching file plugins/FeedsParser.inc
Hunk #1 FAILED at 350.
1 out of 1 hunk FAILED -- saving rejects to file plugins/FeedsParser.inc.rej
or I should always go for dev version of feed module for this patch!
Comment #9
dman CreditAttribution: dman commentedIf you are not able to patch, then yes - do just grab the -dev version where the fix is already available.
Or make the change described in #1 (which is all the patch does) by hand.
Comment #10
gtothab CreditAttribution: gtothab commentedI'm still having the problem described by the original post in this thread. I'm attempting to import a video URL string into a file field (with Media file selector widget type). The string is not getting populated into the field upon import and node creation.
Can anyone help with this?
Thanks!
Comment #11
Nehlatak CreditAttribution: Nehlatak commentedSame problem.
Comment #12
Nehlatak CreditAttribution: Nehlatak commentedI changed the 'Temporary directory' on this page - admin/config/media/file-system. It solved my problem.
Comment #13
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedthe patch has already been included in latest dev
Comment #14
dexiecarla CreditAttribution: dexiecarla commentedHello, does anyone still experience this error? I am using the latest version 7.x-2.0-alpha8, patch is already applied, yet im still encountering the error.
Comment #15
twistor CreditAttribution: twistor as a volunteer commentedThis was fixed a long time ago. Sorry I never got around to closing it.
If you're seeing a similar issue in alpha8, then that's a different issue.
Try upgrading to alpha9.
Comment #16
twistor CreditAttribution: twistor as a volunteer commentedErrr, no this wasn't fixed.
Comment #17
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedAdding similar issues that have possible workarounds.
Comment #18
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedMarked #2161779: How to NOT copy files when importing content? as a duplicate.
Comment #19
kenorb CreditAttribution: kenorb commentedI had similar problem:
I'm using the latest dev.
I've tried to rename the file using hook_file_presave() as shown here, but this error is still there. I think the problem is that Feeds think of this URL as a "file" which repeats with the same name (ShowImageXML.asp), because the query is trimmer and ignored.
Finally solved by the patch from: #2611014: Feeds doesn't import remote images which have no proper extension (such as ASP)
Comment #20
tterranigma CreditAttribution: tterranigma commentedDuplicate of #1570648: Populating Stream Wrapper fields using Feeds