When the item is empty ('fid' = 0) and arrives to the formatter function, it first tries to load the default and then it formats it. However, there might no default as well and it tries to format it anyway generating, for instance, and empty img referece.

Same applies to imagefield, I will place the same patch for it on the project's issues.

Files: 
CommentFileSizeAuthor
#6 imagecache.module.patch486 byteshanoii
imagecache.module.patch485 byteshanoii

Comments

Status:Needs review» Reviewed & tested by the community

Simple, clear patch... tested...

Works, great!
It was quite annoying to have an 'f' show up for empty fields in a View.

i was going to suggest a similar patch until i finally found this one. tested and works as intended.

$item['fid'] is empty even if default image is set (leading to no default image). it's better to check $item['filename']

Version:5.x-2.0» 5.x-2.1
StatusFileSize
new486 bytes

@fairwind: Right, another problem on imagefield #310047: Field is not removed from shared content_field_XXX table on delete just led me to this issue once more and you're right about using 'filepath' for the if condition.

Attached is the new patch against new version of imagecache.

Status:Reviewed & tested by the community» Fixed

thanks, committed to HEAD.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.