There is an bug in the imagemodule when used together with localization.

When the other language is active en you want to reset to defaults in de imagemodule setting
the required "thumbnail" and "preview" in the image sizes table get translated en become editable.
New images also get the translated filename in the database previous entries still have the old filename.
This results in the "loss" of the thumbs of the old images.

The problem can be fixed by removing the call to the t() function in _image_get_sizes();

Current code:

function _image_get_sizes() {
  return variable_get('image_sizes', array(array('width' => 100, 'height' => 100, 'label' => t('thumbnail')),
                                           array('width' => 640, 'height' => 640, 'label' => t('preview'))));
}

My fix:

function _image_get_sizes() {
  return variable_get('image_sizes', array(array('width' => 100, 'height' => 100, 'label' => 'thumbnail'),
                                           array('width' => 640, 'height' => 640, 'label' => 'preview')));
}
CommentFileSizeAuthor
#4 image.module_11.patch974 bytesyched

Comments

toemaz’s picture

Had the same problem.
Patch works fine!

yched’s picture

Status: Needs review » Reviewed & tested by the community

I stumbled on the same problem and had to apply the same correction...
I think this patch is required AND ready to be comitted.

I'm not quite sure i'm entitled to change the 'status' the way I just did, though...

Bèr Kessels’s picture

Status: Reviewed & tested by the community » Needs work

please look at drupal.org/diffandpatch for how to provide a patch.

yched’s picture

StatusFileSize
new974 bytes

Sorry - i didn't even notice there was no actual file included in the original post.

Bèr Kessels’s picture

Status: Needs work » Reviewed & tested by the community

I can confirm this behaviour. This patch fixes it.

Though it is a pity we can no longer translate thubmnail and preview, I think the bug is too big to remain just for this translation thingy.

yched’s picture

Bump.
anyone to commit that patch ?

yched’s picture

Re-bump.

Anyone to commit that patch ?

walkah’s picture

Status: Reviewed & tested by the community » Fixed

applied, thanks.

Anonymous’s picture

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

but now we have these problems: http://drupal.org/node/70396