Hi, when updating my site (for views 2.4), I noticed that it was also asking to run some updates for image.module, so I decided to run them.

However, since then I cannot see any images on the site and I get loads of error messages such as:

# ssue 1's original derivative image was missing. The derivatives will be rebuilt to regenerate it.
# Issue 1's thumbnail derivative image sites/default/files/images/Issue1.thumbnail.jpg was missing. The derivatives will be rebuilt to regenerate it.
# Issue 1's width-180 derivative image sites/default/files/images/Issue1.width-180.jpg was missing. The derivatives will be rebuilt to regenerate it.
# Issue 1's width-120 derivative image sites/default/files/images/Issue1.width-120.jpg was missing. The derivatives will be rebuilt to regenerate it.

Which is basically that even the original image is not viewable. The images exist where they are supposed to be (I had a look using winscp) and even restoring the "image" and "files" tables to backups I had from before does not fix anything.

Ideas?

Comments

naheemsays’s picture

AN additional comment - I tried to update an image with a downloaded version as I thought that would fix things, but all that did was delete the relevant entries from the files and the image tables (removing the message), but did not actually fix the problems (with that image not showing)

also, in addition to the above messages, there are also the following:

# warning: Division by zero in /var/www/vhosts/therevival.co.uk/httpdocs/includes/image.inc on line 196.
# warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /var/www/vhosts/therevival.co.uk/httpdocs/includes/image.gd.inc on line 95.
# warning: imagecopyresampled(): supplied argument is not a valid Image resource in /var/www/vhosts/therevival.co.uk/httpdocs/includes/image.gd.inc on line 121.
# warning: imagejpeg(): supplied argument is not a valid Image resource in /var/www/vhosts/therevival.co.uk/httpdocs/includes/image.gd.inc on line 212.
# warning: imagedestroy(): supplied argument is not a valid Image resource in /var/www/vhosts/therevival.co.uk/httpdocs/includes/image.gd.inc on line 124.
# Unable to create scaled Original image.

EDIT - on another test install I can verify that running the updates again does result in the same erm... result. Question is how do I get back from that? just replacing the files and image tables does not seem to suffice?

You can see an example of the error messages at http://www.therevival.co.uk/magazine/issue1

EDIT - just extra information as I mentioned in drupal-support which may be helpful:

1. the permissions are correct from what I can see. In the above mentioned page, the image has full rwx permissions (0777) which is also the case for the temp folder. the images folder has an owner of apache which has full rwx permissions on it.

naheemsays’s picture

I have run a diff over the relevant tables (I only dumped the files, image, node, node_revisions and variable tables.) and I have found the following change in the variables table which may be the cause:

-('image_sizes', 'a:4:{s:9:"_original";a:5:{s:5:"label";s:8:"Original";s:9:"operation";s:5:"scale";s:5:"width";s:0:"";s:6:"height";s:0:"";s:4:"link";s:1:"1";}s:9:"thumbnail";a:5:{s:5:"label";s:9:"Thumbnail";s:9:"operation";s:5:"scale";s:5:"width";s:3:"160";s:6:"height";s:3:"250";s:4:"link";s:1:"1";}s:7:"preview";a:5:{s:5:"label";s:7:"Preview";s:9:"operation";s:5:"scale";s:5:"width";s:3:"400";s:6:"height";s:0:"";s:4:"link";s:1:"1";}s:9:"width-180";a:5:{s:5:"label";s:9:"width-180";s:9:"operation";s:5:"scale";s:5:"width";s:3:"180";s:6:"height";s:3:"500";s:4:"link";s:1:"1";}}'),
+('image_sizes', 'a:5:{s:9:"_original";a:5:{s:5:"width";s:0:"";s:6:"height";s:0:"";s:5:"label";s:8:"Original";s:4:"link";i:1;s:9:"operation";s:5:"scale";}s:8:"original";a:5:{s:5:"label";s:8:"Original";s:9:"operation";s:5:"scale";s:5:"width";s:0:"";s:6:"height";s:0:"";s:4:"link";i:1;}s:9:"thumbnail";a:5:{s:5:"label";s:9:"Thumbnail";s:9:"operation";s:5:"scale";s:5:"width";s:3:"160";s:6:"height";s:3:"250";s:4:"link";i:1;}s:7:"preview";a:5:{s:5:"label";s:7:"Preview";s:9:"operation";s:5:"scale";s:5:"width";s:3:"400";s:6:"height";s:0:"";s:4:"link";i:1;}s:9:"width-180";a:5:{s:5:"label";s:9:"Width-180";s:9:"operation";s:5:"scale";s:5:"width";s:3:"180";s:6:"height";s:3:"500";s:4:"link";i:1;}}'),

naheemsays’s picture

and I have figured it out. Go to admin/settings/image and under the top "original" image size there will also be another one. Remove that and save. then all is good.

naheemsays’s picture

Status: Active » Closed (fixed)

Setting to closed, but there may be a need to change the update functions to not allow such user stupidity (or I may simply be a special case!)

citronica’s picture

Thank you! Your fix worked perfectly!