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.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | upload_replace-not-work-with-feeds-2139685-6.patch | 9.64 KB | mibfire |
| #5 | upload_replace-not-work-with-feeds-2139685-5.patch | 9.7 KB | mibfire |
| #4 | upload_replace-not-work-with-feeds-2139685-4.patch | 1.03 KB | mibfire |
| #3 | upload_replace-not-work-with-feeds-2139685-3.patch | 1009 bytes | mibfire |
Comments
Comment #1
eevensen commentedHey 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.
Comment #2
mibfire commentedThe 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.
Comment #3
mibfire commentedI made a patch for this error(Resource is not a file or it is an empty directory).
Comment #4
mibfire commentedThere were a couple of errors, i fixed it.
Comment #5
mibfire commentedshit, a new error, fixed
Comment #6
mibfire commentedneedless isset, removed