Hi,
Background:
I have a very strange, not systematically reproducable error. My imagecache version is the 6.2-dev from Aug2010, but as far as I see there were no changes in 6.2-dev relevant to this problem. The origin of this problem will be somewhere outside the imagecache module, but the resulting problem is probably based on some missing checks within imagecache.
Setup:
I have some views that display a nodes images in javascript etc. To make page-rendering nicer and send correct dimensions to some javascripts, the modules check on the fly, whether the relevant presets have been rendered yet and otherwise generate the thumbnails on the fly via "imagecache_generate_image" before displaying the page.
Problem:
Sometimes the generated thumbnails for multiple images within a node are not correct. Lets say I have:
Image1.jpg
Image2.jpg
Image3.jpg
the generated imagecache files have the correct naming:
imagecache/preset_name/Image1.jpg
imagecache/preset_name/Image2.jpg
imagecache/preset_name/Image3.jpg
BUT
imagecache/preset_name/Image2.jpg is identical with imagecache/preset_name/Image1.jpg and of course not the correct thumbnail for Image2.jpg.
As you can imagine this is a hudge problem and difficult to identify. When I delete the generated images and reload the page, the problem disappears.
My suspicion is, that maybe (from an error somewhere else) an array or object might be passed to imagecache_create resulting in the mix-up of filenames. I have now started adding checks for strings, but since I am not able to reproduce the problem, I cannot check whether this is a solution.
Comments
Comment #1
digi24 commentedI am closing this, after having implemented several validation mechanisms, I think the error is within views_nivo. If anybody comes across the same problem, please reopen, maybe we can narrow it down.
Comment #2
digi24 commentedHmm, unfortunately, the problem reappears from time to time and is not related to views nivo, as I wrongly assumed.
To simplify my initial description:
1. Create a normal view which displays a nodes' images from a multi-value imagefield.
2. Use imagecache to display eg. thumbnails of these images
3. some thumbnails will be identical, although the underlying files are different.
Comment #3
fizk commentedPlease reopen if this is still an issue with ImageCache 6.x-2.0-rc1.