Hi,

I have been puzzled with this problem.
For some nodes that I have, theme_cloud_zoom_formatter_imagefield() is not fired.

Upon further investigation, $field_image_cache[--index--]['view'] is missing for each image in the node without the cloud zoom preview.
--index-- is just the index number.
The preview and zoomed images are actually generated in the imagecache folder.

I have lightbox2 installed as well and it's working well.

Thanks.

Comments

thekid’s picture

Title: Preview appearing for most nodes, not appearing for some » Hackish solution

I need to finish the site soon and I couldn't find the reason why it didn't work, so I resorted to a hackish solution. Would there be any repercussion caused by this? Please comment.

function mymodule_nodeapi(&$node, $op, $arg3, $arg4) {
  if($op == 'alter') {
    $element = array();
    $element['#formatter'] = 'imagefield__cloud_zoom__cz_preview__cz_zoom';
    $element['#item'] = array();

    foreach($node->field_image_cache as $key => $fic) {
      if(!isset($node->field_image_cache[$key]['view'])) {
        $element['#item']['filepath'] = $fic['filepath'];
        $node->field_image_cache[$key]['view'] = theme('cloud_zoom_formatter_imagefield', $element);
      }
    }
  }
}
neokrish’s picture

For some nodes that I have, theme_cloud_zoom_formatter_imagefield() is not fired.

How does these nodes differ from the nodes that have cloud_zoom working?

nicholasthompson’s picture

Status: Active » Postponed (maintainer needs more info)

Is it possible the field was Excluded from display?

dakku’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (outdated)