Closed (fixed)
Project:
Image
Version:
6.x-1.x-dev
Component:
image_attach
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2009 at 10:45 UTC
Updated:
20 Mar 2009 at 15:00 UTC
Rendering an Image_attach field in Views does not work when used through [patched] Nodereferrers or CCK's Nodereference Relationships.
The reason lies in contrib/image_attach/image_attach_views_handler_field_iid.inc on line 42. A hardcoded field name is used instead of $this->field_alias when getting the Image node.
This patch simply replaces that hardcoded name ($values->image_attach_iid) with $values->{$this->field_alias}.
I've tested it with Relationships through both Nodereferrers and Nodereference fields and I think that's all that needs to be done. It's my first patch though so I'm bound to have made some mistake...
Created the patch from the image module root.
| Comment | File | Size | Author |
|---|---|---|---|
| field_alias.patch | 846 bytes | twod |
Comments
Comment #1
sunBetter title. Patch looks good. Just needs one confirmation.
Comment #2
sunCommitted.
Heh - wow! That was "your first patch"? Nice! :)
Comment #3
twodYup, my first patch it was!
Looks like one of the few so far which I haven't missed something on. :s hehe
Comment #4
sunbtw, sp3boy is desperately seeking for a patch review and test in these issues:
#298702: Properly validate image uploads
Looks pretty good (visually) already, but needs testing.
#81102: Attach Multiple Images with image_attach using Drupal upload mechanism
Not sure about that one.