Closed (fixed)
Project:
ImageCache
Version:
6.x-2.0-beta9
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Dec 2008 at 11:03 UTC
Updated:
25 May 2012 at 03:21 UTC
When I write a story I add some images with image cache, but when I want to see the preview the image cache images are not generated[using image cache + image field + filefield +cck - all directories under /files and /files are chmod 777, ]; images are generated just if I save the story.
Any ideas why ?
Comments
Comment #1
drewish commentedi'm guessing that you're using private file transfers. am i right?
Comment #2
idflorin commentedNo, I'm using "Public - files are available using HTTP directly."
Comment #3
drewish commentedis your temporary directory located under the webroot and accessible by the browsers?
Comment #4
idflorin commentedMy temp in http://www.adsneeze.com/files/tmp
Comment #5
sean.mtm commentedI ran into the problem here, too. The problem only occurs when trying to preview a node with CCK image fields that have not yet been written to the DB (and thus, does not have a NID). In the case of my CCK-based image fields, $element['#node'] contains the unsaved node, which does the job if I've uploaded images.
There's another problem that pops up if there's an empty field (ie - optional image field w/ no image) where theme_imagecache_formatter() calls imagecache_field_formatter() passing $element['#field_name'] in where a field structure is expected (for looking up things like $field['use_default_image']). My patch just avoids the problem by not passing empty images across but there's probably a better way to do it.
Here's a patch - it's kind of ugly but it works.
Comment #6
drewish commentedi just committed some other formatter changes so this might not be relevant any more. could someone go grab -dev and test it out?
Comment #7
fizk commented