I've tested the latest 5.x-1.4 on a new site and it works fine.

However, on a site recently upgraded from Drupal 4.7, sharing the same Drupal files, the original images are displayed instead of the thumbnails in the image gallery and the blocks. I've regenerated the thumbnails and it works perfectly. I could see the thumbnail and preview files correctly attached to the image node.

Here's a sample gallery.

And here's a sample image node with the attached thumbnail and preview images. As one could see, the original is being displayed as the default image instead of the preview.

Comments

Hetta’s picture

Rebuilding the derivatives (admin/content/node -> type: image (or category: $gallery_name), update options: rebuild image thumbnails) did the trick for me, for the few stray originals I had after moving my files folder.

Camus-1’s picture

I've rebuilt the derivatives for the images shown in my sample gallery, but it didn't solve the problems for me.

drewish’s picture

Camus can you contact me via PM so I can get a db dump of your {node}, {files}, and {file_revisions} tables?

drewish’s picture

so the problem is that the filename field in the files table start with an uppercase letter. i'm not too sure how this happened but it seems like the update for the image size settings didn't work quite right. i'm waiting to get a dump of Camus' variables table.

soupp’s picture

Hm... good point about uppercase. It is uppercase (IMG_ZZZ.jpg). But there are no deviates created (only original files in files/images). OK. Selected images to rebuild thumbs. After hit submit there is a message:
---------------
Rebuilding IMG_7808's resized images.
Rebuilding IMG_8436's resized images.
Rebuilding IMG_7802's resized images.
Rebuilding IMG_8409's resized images.
Rebuilding IMG_7801's resized images.
Rebuilding IMG_8247's resized images.
Rebuilding IMG_7800's resized images.
Rebuilding IMG_7810's resized images.
Rebuilding IMG_8450's resized images.
Rebuilding IMG_7798's resized images.
Rebuilding IMG_7794's resized images.
The update has been performed.
---------------
AND then (all of a sudden) repeating:
---------------
warning: Illegal offset type in isset or empty in /home/.../httpdocs/modules/taxonomy/taxonomy.module on line 1150.
warning: Illegal offset type in /home/.../httpdocs/modules/taxonomy/taxonomy.module on line 1151.
---------------

The resize was good this time. But what's taxonomy doing here? (it's freetagging)

soupp’s picture

Ouch.... missed te node. It was supposed for http://drupal.org/node/157882
Sorry. I'll repost it there.

drewish’s picture

Status: Active » Needs review
StatusFileSize
new3.39 KB

okay, after you've made a backup, please apply the attached patch and run update.php. it should fix the problem with your size settings and update the files records in your database.

Camus-1’s picture

Thanks drewish,

I applied the patch and ran update.php. It was successful, but no queries were executed.

I ran "Rebuild image thumbnails" update but around 40% of the images returned the "Unable to create scaled Thumbnail" error. For those images which didn't return the error message, all the image derivatives were created perfectly.

Here's how my image gallery now looks with some of the images missing the thumbnails.

I have no idea why I can rebuild the derivatives only for some of the images and not the others. It seems that certain images simply refused to be rebuilt. The current manual technique I'm using to fix it is to delete the original file (at the node/{nid}/edit) and re-uploading it. The image derivatives would be perfectly created upon the re-uploading of the original image.

All in all, I'm pretty happy with the progress. I'll be fixing the problematic images manually unless you could point out any specific problems with those images.

Thanks! :)

Camus-1’s picture

OK. I've just noticed that if I run "Rebuild image thumbnail" update to the very image which I have just fixed manually by the above method, the same "Unable to create scaled Thumbnail image" error would pop up and both the records for preview and thumbnail images would be deleted from the drupal_files table.

drewish’s picture

camus, it wouldn't have listed any queries. can you send me a new db dump of your {node} {files} {file_revisions} and {variables} tables?

drewish’s picture

StatusFileSize
new4.83 KB

this version of the patch will display the update queries.

drewish’s picture

StatusFileSize
new3.37 KB

ignore that last one, it has some unrelated changes rolled in.

Camus-1’s picture

I've applied the latest patch.

FYI, the following was the output of update.php:

The following queries were executed
image module
Update #5

* No queries

drewish’s picture

Status: Needs review » Fixed

Caums, that last db dump you sent me looked like the update worked correctly. i've committed the patch.

the problem now is that you've got a lot of missing derivative images and no easy way to regenerate just the ones you need. i've got code in #133436 to do it but that makes a bunch of other changes. i'll break it out so that the rebuild option goes in to #154156. go ahead and subscribe to that issue we can follow up on there.

Camus-1’s picture

Thanks drewish,

I'll follow up from there.

Anonymous’s picture

Status: Fixed » Closed (fixed)
v8powerage’s picture

Status: Closed (fixed) » Active

I'm just trying to update this bloody thing and I got this message:

* The original image size was missing so no changes were made. See this image module issue for more information. Include the following:

Array
(
[0] => Array
(
[label] => thumbnail
[operation] => scale
[width] => 320
[height] => 320
[link] => 0
)

[1] => Array
(
[label] => preview
[operation] => scale
[width] => 640
[height] => 640
[link] => 0
)

)

* user warning: Table 'image' already exists query: CREATE TABLE image ( `nid` INTEGER UNSIGNED NOT NULL, `fid` INTEGER UNSIGNED NOT NULL, `image_size` VARCHAR(32) NOT NULL, PRIMARY KEY (`nid`, `image_size`), INDEX image_fid(`fid`) ) /*!40100 DEFAULT CHARACTER SET utf8 */; in /home/unitra/htdocs/new/includes/database.mysql.inc on line 174.

What shall I do next?

Hetta’s picture

Status: Active » Closed (fixed)

get your database backup back up
delete the image table you had hanging in there from drupal 4.x
upgrade again.

You're set.

Your issue is unrelated to this one ... if this doesn't fix it, make a new issue. Thanks.

v8powerage’s picture

That's exactly what I done, and it doesn't works, plus I created a new issue http://drupal.org/node/395168

v8powerage’s picture

Status: Closed (fixed) » Active
Hetta’s picture

Status: Active » Closed (fixed)

Ah. issues are created by clicking on "create a new issue" in the issue queue for the module ... here: http://drupal.org/project/issues/image

Forum posts aren't issues.

This particular issue is closed.