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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

milesw’s picture

Patch to catch exceptions at the filefield mapper level.

milesw’s picture

First patch was created with bad paths

m.stenta’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #3 solves the issue. I've been using it in a production site for over two years now.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, feeds-filefield-mapper-error-handling-1095826-3.patch, failed testing.

m.stenta’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
1.59 KB

Updated 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.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, feeds-filefield-mapper-error-handling-1095826-4.patch, failed testing.

twistor’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)