A user of one of our sites that uses Feeds just accidentally uploaded an empty CSV file to Feeds (he saved the wrong workbook page in Excel, causing the file to be empty instead of containing the items in the first tab of the workbook). When this happened, the user received a failure message on the batch operation screen that indicated "500 Internal Server Error".

Internally, the error was:

E_ERROR: Call to undefined function FeedsParserResult()

Stack trace
in FeedsCSVParser::parse called at modules/contrib/feeds/plugins/FeedsCSVParser.inc (31)
in FeedsCSVParser::parse called at modules/contrib/feeds/includes/FeedsSource.inc (391)
in FeedsSource::import called at modules/contrib/feeds/feeds.module (190)

When the user correctly saved the CSV file with data and uploaded it again, it worked, but I wanted to point out that the error handling for his case should probably be more user friendly.

My guess is that because the CSV is empty, the FeedsParserResult class never gets loaded elsewhere, causing a failure when it's referenced later.

Comments

  • twistor committed f630564 on 7.x-2.x
    Issue #2390199 by GuyPaddock: Unhelpful failure upon uploading an empty...
twistor’s picture

Status: Active » Fixed

Thanks. That's actually invalid code.

guypaddock’s picture

You rock. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.