Hi im trying to make a node view and on it display the last commentators user picture. Ive added relationhip Comment User and then in the user image field ive used that relationship. As you can see here though i have an entry for every comment on the post.

http://img713.imageshack.us/img713/443/viewc.jpg
http://img832.imageshack.us/img832/3886/viewoutput.jpg

Ive tried using distinct etc without any effect. Is there a way to do this?

Thanks

CommentFileSizeAuthor
#3 1301366.patch954 bytesdawehner

Comments

dawehner’s picture

Well you have a relationship for the last comment author availible. Then get the user: picture by adding a user: picture field with the last comment author relationship.

fadgadget’s picture

Thanks for the reply dereine. I do have the relationship added you mention. the 'Comment: User
The User ID of the comment's author.' then the "User: Picture The user's picture, if allowed." field is added using the relationship added. As you can see from the 2nd screenshot above all i get is a load of entries from the same node. I have to admit dereine i have no idea why i cant get the desired output as it does all make sense to me and i think i have done it right.

dawehner’s picture

Category: support » feature
Status: Active » Needs review
StatusFileSize
new954 bytes

Oh! there is no relationship available, sorry for assuming this.

Feel free to test the patch.

fadgadget’s picture

Thanks for your help dereine your patch worked great. I now have a "Node: Last comment author" relationship and all my views work just as i had hoped. Thanks again.

Letharion’s picture

Status: Needs review » Reviewed & tested by the community
fadgadget’s picture

Hi Dereine. I hope you dont mind me asking here. Ive had to revert back to views 2 due to a new theme i have on my site. Im having problems with the code when adding it to my new file. Would it be differant code for Views 2?

thanks

dawehner’s picture

No it won't be but this patch will not be added to views2.

dawehner’s picture

Status: Reviewed & tested by the community » Fixed

Commited to both 7.x-3.x and 6.x-3.x

Status: Fixed » Closed (fixed)

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

David_Rothstein’s picture

The field introduced here seems broken... I filed an issue about it here: #1443244: "Content: Last comment uid" field is broken (fatal error)