D 6.14
Image 6.x-1.0-beta3

I have installed and used the Image attach module to display attached images in a block. As I hoped, each image in the block is supposed to be a link back to the image node, where the user can see the entire image node. But, the link doesn't work. It produced a link to 'node/' , the homepage.

The problem, I discovered, is in a function theme_image_attach_block_attached . It starts at line 539. ON line 545, the error occurs. this:
$content .= '

' .l($img, "node/$iid", array('html' => TRUE)). '

';
should be this
$content .= '

' .l($img, "node/$image->nid", array('html' => TRUE)). '

';

$iid is undefined in the function.

I didn't find reference to this bug after a cursory search. It could be that when folks have had problems with this, they just use views to produce the same output, as a workaround - which would be straightforward.

I will attempt to roll a patch for this later, which is about as minor and trivial of a bug as anyone could bother to report!

Comments

joachim’s picture

Status: Active » Closed (duplicate)

Thanks for taking the time to report this, and doing the the debugging work -- always appreciated! :D
It is however a duplicate -- #579320: Wrong link in "Attached Image" block.
You'll find the fix in the dev version.

If you have the technical ability to make/apply patches and have time to help, there are several patches in need of review, and three of these on image_attach. If you work with theming, I'd appreciate testing and opinions on #412288: restructure theme_image_attach_body/teaser .