The filefield mapper uses FeedsEnclosure to retrieve remote files and save them. Currently if there is a problem getting a file during FeedsEnclosure::getFile(), it will throw an exception. Using FeedsNodeProcessor, the exception is caught at FeedsNodeProcessor::process(), the feed item gets unnecessarily skipped, and the import moves on to the next item. With the other processors the exception may even halt the entire import -- haven't tried any others.
The filefield mapper should include error handling so that issues with files do not disrupt the rest of the import. Feeds should just log the problem and continue mapping the feed item.
Related:
http://drupal.org/node/706908#comment-2637488 (alex_b points out this very issue)
http://drupal.org/node/686470
Comment | File | Size | Author |
---|---|---|---|
#6 | feeds-filefield-mapper-error-handling-1095826-4.patch | 1.59 KB | m.stenta |
#3 | feeds-filefield-mapper-error-handling-1095826-3.patch | 1.58 KB | milesw |
#1 | feeds-filefield-mapper-error-handling-1095826.patch | 1.59 KB | milesw |
Comments
Comment #1
milesw CreditAttribution: milesw commentedPatch to catch exceptions at the filefield mapper level.
Comment #2
milesw CreditAttribution: milesw commentedThe same two links from above with titles visible:
#706908: Enhance filefield mapper to perform more validation on remote URLs
#686470: Filefield mapper: URLs with spaces not parsed properly
Also related:
#706736: Enhance FeedsEnclosure to handle special characters and download failures
#755544: Keep batch processing when mapping fails for particular node (e.g. filefield raises exception 'Download of url failed')
Comment #3
milesw CreditAttribution: milesw commentedFirst patch was created with bad paths
Comment #4
m.stentaPatch in #3 solves the issue. I've been using it in a production site for over two years now.
Comment #6
m.stentaUpdated patch against the current 6.x-1.x branch (was originally against 6.x-1.0-beta10). The only difference was a change from "false" to "FALSE" in some of the code that this patch moves around. So I still think this should be RTBC.
Comment #8
twistor CreditAttribution: twistor as a volunteer commented