Closed (outdated)
Project:
Feeds
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2013 at 03:01 UTC
Updated:
9 Feb 2026 at 19:42 UTC
Jump to comment: Most recent
Whenever I attempt to use file upload, I get the following error:
Exception: Resource is not a file or it is an empty directory: in FeedsFileFetcher->fetch() (line 67 of feeds/plugins/FeedsFileFetcher.inc).
the line is:
throw new Exception(t('Resource is not a file or it is an empty directory: %source', array('%source' => $source_config['source'])));
the array result is:
[FeedsFileFetcher] => Array ( [fid] => [source] => [upload] => )
Comments
Comment #1
socialnicheguru commentedcaused by patch here: https://drupal.org/node/1127696
Comment #2
guypaddock commented@SocialNicheGuru: Your comment literally makes no sense. I've reviewed the other issue and there's nothing to indicate they're related.
I'm seeing this issue when running the latest version of Feeds on Acquia Dev Desktop. I have verified that the File Fetcher settings and Drupal File system settings are configured correctly.
This issue completely blocks the ability to do CSV imports.
Here's an export of my importer:
Comment #3
megachriz@GuyPaddock
I tried your importer, got a lot of missing targets (even after installing profile2 module and adding fields to a profile entity) so I removed these. Then downloaded the CSV template, added an item to it and imported that. Result: "Created 1 user."
Can it be that the file permissions of the folder are not correct? If they are correct, can you provide the steps to reproduce the issue? Now it looks like something related to profile2 is involved.
Comment #4
qproSimilar here (debian 8.3, drupal 7.43, Feeds 7.x-2.0-beta2),
I am able to import a file indicating file name (public://feeds/filename.xml), but If I don't set the file name (public://feeds/ or public://feeds) I get "Resource is not a file or it is an empty directory"
Comment #5
megachriz@qpro
I tried to reproduce your issue this way:
Result: Created 1 node.
Can you provide the full steps to reproduce the issue? Also, it seems your settings are different from what is reported in #2 where the option "Supply path to file or directory directly." was not enabled.
If the issue occurs even if you keep the importer settings as much to the defaults as possible, try if you can reproduce the issue on a fresh install.
Comment #6
qproOk , in my case it's solved:
"Allowed file extensions" (in "File upload Settings") is case sensitive.
I had added "xml" but our vendor files has "XML" extension, so the solution is to add XML (uppercase) to "Allowed file extensions" or rename all files extensions to xml (lowercase).
Thanks for your time reproduccing the issue, it makes me realize about the true problem.
Comment #7
megachriz@qpro
Ah, then your issue is probably different than the original issue here. The check for allowed file extensions when supplying a directory of files is new since 7.x-2.0-beta2 (added after this issue was created). See #2309471: File Fetcher doesn't obey allowed extensions.
I think that the extension check should be case insensitive, though.
Comment #8
ann b commentedSame as #4. I'm getting the following errors after attempting to import a csv file:
*
Drupal 7.54
Feeds 7.x-2.0-beta3
*
But if I manually enter the path, then it worked ok.
private://feeds/test.csv
Comment #9
ericmulder1980 commentedI am getting this issue on Drupal 7.56 with Feeds 7.x-2.0-beta3. Strange thing is that it works without issues when manually running the import in a browser and even when running it through drush feeds-import-all. When running it through the Job Scheduler i get the "Resource is not a file or it is an empty directory" issue.
Comment #10
nikita_ttFor @ericmulder1980 (comment #9) and future researchers. I faced the same issue. The problem was in the way how cron was run.
In my case it was triggered via drush every minute. Command:
drush -l mysitealias -r /var/www/html cron. Because of the "-l mysitealias" option the real path of the file was built wrong.Comment #11
bluegeek9 commentedDrupal 7 reached end of life and the D7 version of Feeds is no longer being developed. To keep the issue queue focused on supported versions, we’re closing older D7 issues.
If you still have questions about using Feeds on Drupal 7, feel free to ask. While we won’t fix D7 bugs anymore, we’re happy to offer guidance to help you move forward. You can do so by opening (or reopening) a D7 issue, or by reaching out in the #feeds channel on Drupal Slack.
If this issue is still relevant for Drupal 10+, please open a follow-up issue or merge request with proposed changes. Contributions are always welcome!