Using a custom view (list view) and a preset as a link to the image, Imagecache outputs an image with the src pointing to the preset's url and the link points to the files directory. Without the link (preset only), a broken image is still output.

I've also had to change the imagecache_create_url function to play nice with i18n, since the url function appends the language before anything else, so I was getting /fr/files/imagecache ... in the src of the images. I haven't changed it for private downloads but the problem is probably there also.

CommentFileSizeAuthor
imagecache.module.patch1.76 KBcaktux

Comments

johanneshahn’s picture

i have the same problem :)
but solved it one function earlier.

near line 732 at the top off theme_imagecache function

function theme_imagecache_formatter($field, $item, $formatter) {
old code:
$output = theme('imagecache', $formatter, $item['filepath'], $item['alt'], $item['title']);
replaced with:
if(isset($item['filepath'])){
    $output = theme('imagecache', $formatter, $item['filepath'], $item['alt'], $item['title']);
  }else{
   return;
}

so to all people who wondering about the login window that pop's up (with xampp).

hope one developer of imagecache will close this bug report and patch the patch from caktux next time.

vacilando’s picture

Priority: Normal » Critical
Status: Active » Needs review

I confirm caktux's patch works fine for me!

This is a serious problem, amongst other things also preventing image display in UberCart catalog -- see http://drupal.org/node/339438#comment-1132156

joachim’s picture

This patch isn't up to date any more:

For instance, 5.x-2.2 has this in imagecache_field_formatter:

  // If there is no filepath at this point, do nothing.
  if (empty($item['filepath'])) {
    return;
  }

Is this bug still a problem in the latest release?
I'm getting something that's possibly related in 2.2: http://drupal.org/node/356429

fizk’s picture

Status: Needs review » Closed (won't fix)