1

I'm using feeds to import images. The images are saved into a subfolder in sites/default/files/[nid] using filefield_paths module. Usually, imports work fine.

But as I am constantly tweaking the import process and data, occasionally, a node doesn't import properly and throws a SQL error like

"SQLSTATE[HY000]: General error: 1366 Incorrect string value...".

When this happens, the image is saved in sites/default/files, not sites/default/files/[nid]. And when I delete imported nodes, the images that were properly saved in subfolders are deleted, but the ones saved in sites/default/files are not deleted, and I have to delete them manually.

Here's the issue... After I fix the import error, the imported nodes continue to be saved in sites/default/files, not in the subfolder sites/default/files/[nid]. I have tried flushing all caches, disabling then enabling the feed importer, and running cron, but nothing works. The only thing that works is that if I wait overnight, the next day the import works fine and saves images in the proper folder.

This is extremely frustrating since every time I make an import error, I have to wait until the next day to keep working on the import.

My conclusion is that there must be a timed cached somewhere that clears after 12 or 24 hours or something which remembers where it last saved imported images. But I have no idea where this could be. Any ideas?

Thanks!

  • I am not sure about this specific issue, but a common methodology to work around some issues with images and feeds is to use the media and media_feeds modules. If you are interested I could provide more insight. – Wtower Dec 19 '14 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.