I'm using Link Image Field in conjunction with an image cache preset. When I create a node and do not put an image in that field Link Image Field creates the following:

Only local images are allowed.

Which basically creates a broken image on the node.

Comments

studioaarrgh’s picture

Sorry.. I haven't had my coffee today. Here's the code it generated:

<div class="field field-type-filefield field-field-platinum">
<div class="field-label">Platinum Sponsors: </div>
<div class="field-items">
<div class="field-item odd">
<a class="linkimagefield imagecache imagecache-platinum imagecache-linkimage imagecache-platinum_linkimage" href="/">
<img class="imagecache imagecache-platinum" title="" alt="" src="http://woundedwear.org/sites/default/files/imagecache/platinum/">
</a>
</div>
</div>
</div>
studioaarrgh’s picture

Anyone out there? Buehler?

studioaarrgh’s picture

Is no one supporting this module anymore?

Greg__’s picture

I've got the same issue.
Fixed it temporaly adding this code

// If Filepath is empty after the last test, hide the field
if (empty($item['filepath'])){
  return '';
}

Bellow this one (line 279)

function theme_linkimagefield_imagecache($element) {
  $field = content_fields($element['#field_name']);
  $item = $element['#item'];
  $formatter = $element['#formatter'];

  if (empty($item['fid']) && $field['use_default_image']) {
    $item = $field['default_image'];
  }
  // Views does not load the file for us, while CCK display fields does.
  if (empty($item['filepath'])) {
    $item = array_merge($item, field_file_load($item['fid']));
  }