Hi, if i select a style for my preview and drupal has not rendered and generated the resized version of the image i only get an image not found icon.
if I make it render this image in that specific style once, al previews for that image start working.
if i select the preview as the default image it works as drupal do not have to generate a cached version of that.
tried looking at the code but found nothing, I'm really not very familiar with drupal API

Comments

sidone’s picture

Hi I just experienced the same problem. It seems that there is an issue how the url for the hover image is generated:

The following code part in hover_preview.module is responsible for creating the hover url.

    // The hover preview image style.
    if (isset($display['settings']['hover_preview_style']) && !empty($display['settings']['hover_preview_style'])) {
      $hover_uri = image_style_path($display['settings']['hover_preview_style'], $item['uri']);
      $element[$delta]['#attributes']['data-hover-preview'] = file_create_url($hover_uri);
    }

Unfortunately is image_style_path not creating the the style for the image. My solution was to replace image_style_path by image_style_url which is creating the new style for the image:

    // The hover preview image style.
    if (isset($display['settings']['hover_preview_style']) && !empty($display['settings']['hover_preview_style'])) {
      $hover_uri = image_style_url($display['settings']['hover_preview_style'], $item['uri']);
      $element[$delta]['#attributes']['data-hover-preview'] = $hover_uri;

    }
bertboerland’s picture

I had the same problem and can confirm that patch is working for me

Berliner-dupe’s picture

Patch works not correct by me.

When i have 6 images over a view - only by 3 images is rendered-version available. Other 3 i get an error. When i look in files-folder the 3 images are not existing.

Has anyone an idea to fix this problem?

Best Regards
Matthias

Edit: This solution works for me now: https://drupal.org/node/1932340#comment-7618107

bertboerland’s picture

Status: Active » Closed (duplicate)