Attempts to import a folder of images result in:
* Successfully imported:
o 6283.jpg as 6283 [edit]
....
and so on for all images, followed by:

The selected file /home/username/rootofmysite could not be copied.

The nodes are created, and the images are removed from the import folder, but they never get copied to their new location.

The patch fixes this by waiting until after the node is saved to build the derivative images, in the image_create_node_from function.

Comments

drewish’s picture

Status: Reviewed & tested by the community » Needs review

if the derivative don't need to be build before saving the node then you shouldn't need to do it afterwards...

daemonchrist’s picture

You're right, and the images seem to get rebuilt the first time you view the thumbnails anyway...

daemonchrist’s picture

StatusFileSize
new304 bytes

Updated patch. Derivative images seem to get built anyway. Also eliminates the unnecessary rebuilding on first view.

guillaumeduveau’s picture

Thanks for the patch !

guillaumeduveau’s picture

FYI the same bug survived to 6.x-1.x-dev so I ported the patch : #221601: fix image import in 6.x-1.x

drewish’s picture

Version: 5.x-1.6 » 6.x-1.x-dev

marked http://drupal.org/node/221601 as a duplicate. bumping this to the latest version with the problem we need to commit the fix there first and then backport.

guillaumeduveau’s picture

StatusFileSize
new563 bytes

Sorry about the workflow. Here's the patch against CVS HEAD.

daemonchrist’s picture

Title: Image Import broken in 5.x-1.6 » Image Import broken

My wife has been using this patch for about a month to upload images to her photography site without any problems.

While it took me several hours of head scratching to track down this bug, the fix is easy (one line).
Can anyone confirm if this got fixed in the 5.x-1.7 release? If not, can we get someone with commit access to look at this?

Hetta’s picture

Can't reproduce the problem, but I can confirm that the patch in #7 doesn't break things, in the latest 6.x-1.x-dev.

omnyx’s picture

i'm a bit confused now - is the same problem present in the newest image module for drupal 5.x or has the patch been implemented for drupal 5.x version as well?

off the side - daemonic, would you please share with us how your wife managed to do the thing when you click on an image and it loads in a small window, dims the rest of the screen, and you can cycle the images within the album in this small window? it's way cool :)

thanks

drewish’s picture

Version: 6.x-1.x-dev » 5.x-2.x-dev
Status: Needs review » Patch (to be ported)

Committed this to HEAD... need to backport.

drewish’s picture

Status: Patch (to be ported) » Fixed

committed to DRUPAL-5 and DRUPAL-5--2

guillaumeduveau’s picture

Omnyx : he uses the Lightbox2 module, but don't know how he integrated it with the gallery.

omnyx’s picture

@ guix - thanks. I think the Lighbox2 module is compatible with image-field gallery...

Anonymous’s picture

Status: Fixed » Closed (fixed)

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