Closed (duplicate)
Project:
Image
Version:
6.x-1.0-beta3
Component:
image.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Nov 2009 at 14:44 UTC
Updated:
7 Oct 2010 at 07:59 UTC
After attaching an image to a Story and creating news listing in Views2 I got following messages in lines 702 and 703. Quick workaround attached.
| Comment | File | Size | Author |
|---|---|---|---|
| image.module.patch | 701 bytes | unjello |
Comments
Comment #1
joachim commentedHmm, we should never be getting there without a node title!
That workaround works, but the proper fix is to get a node title into that $node object.
You're using the attached image field, right?
The best fix I think would be at this point:
add a JOIN to {node} there and get the title.
That necessitates a change in the storage in $attached_images, as we're no longer just stashing a flat array of nids.
Come to think of it, we could move the call to image_load() into pre_render() too -- that might save a query or two if the same images are attached to different stories. That then means that $attached_images is an array of pseudo-$node objects.
So quite a big patch...will work on it later :)
Comment #2
joachim commentedAlmost certainly obsolete -- the image attach theme functions have changed a lot since this.