If I have a node that I didn't upload a linkfiled image too, when using views and displaying linkfield image as a field in views instead of returning nothing link imagefield module it returns code with non existent src.

<A class="linkimagefield imagecache imagecache-gridnail imagecache-linkimage imagecache-gridnail_linkimage" title="" href="http://www.n.com/" target="_self"><IMG class="imagecache imagecache-gridnail" title="" alt="" src="http://www.n.com/sites/agilityvision.com/files/imagecache/gridnail/" /></A

Seems a check is need to see if the field has a value, otherwise return '' instead of the above.

Comments

agilpwc’s picture

Status: Active » Needs review

I found the problem in
function theme_linkimagefield_imagecache
you check whether a item has empty fid and if there is default image definded. But there is no check if item has empty fid and no default image defined. In which case you would just return ''
so about line 292 add

else if (empty($item['fid'])) { // mod by eric
    return '';
  }
johnfyoung’s picture

Status: Needs review » Reviewed & tested by the community

Looks good. Thanks - I've included it with a few other things that I'm still working on. Will release something (likely today).

johnfyoung’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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