When re-importing a previously imported file through the Feeds importer, you get the following errors and cannot import the feed:

  • Notice: Undefined variable: is_blocked in upload_replace_file_update() (line 71 of /srv/bindings/27b55f9b711141b793a3739da88cbe29/code/sites/all/modules/contrib/upload_replace/upload_replace.module).
  • Notice: Undefined variable: is_blocked in upload_replace_file_update() (line 102 of /srv/bindings/27b55f9b711141b793a3739da88cbe29/code/sites/all/modules/contrib/upload_replace/upload_replace.module).
  • Resource is not a file or it is an empty directory: public://feeds/events_importer_template_xmas_0.csv

You can solve the problem by renaming the file each time you have to re-import, but I would think Upload Replace should exclude Feeds imports from its operation.

Comments

eevensen’s picture

Hey guys!
Patch #44 in Parameter 1 to upload_replace_file_update() expected to be a reference, value given in module_invoke_all() works well when you save a node manually, but not when you import nodes with the Feeds module (both Feeds 7.x-2.0-alpha8 and 7.x-2.x-dev).

The error messages reported by BrightBold seems to have disappeared, but a file imported to a node (as managed file with the Feeds module) still gets "mydoc_0.doc".
When I edit the same node, delete the file, and re-upload the file to the node manually, the module works as intended.

The reason is, as far as I understand, that the Feeds module uses its own callback function "file_feeds_set_target" and not "hook_file_update".

How can we fix this? Let me know how to help.

mibfire’s picture

The error message(Resource is not a file or it is an empty directory) reported by BrightBold has not disappeared! I have got the same message with the latest dev upload file replace.

mibfire’s picture

I made a patch for this error(Resource is not a file or it is an empty directory).

mibfire’s picture

There were a couple of errors, i fixed it.

mibfire’s picture

shit, a new error, fixed

mibfire’s picture

needless isset, removed