Closed (fixed)
Project:
Flag Friend
Version:
7.x-1.x-dev
Component:
Views integration
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jan 2011 at 00:09 UTC
Updated:
8 Apr 2011 at 20:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sirkitree commentedMaking it more obvious to the casual browsers of issues.
Comment #2
jyee commentedI've attached a patch to includes/flag_friend_handler_argument_numeric.inc that resolves the errors above.apparently add_where() is stripping spaces from the $field arg, so the patch simply moves the rest of the subselect to the $value arg
There's still a problem where the "View All Friends" tab doesn't display friends.The "Awaiting Friend Approvals" and "Friend Requests" tabs appear to be working as intended.
edit: see following post
Comment #3
jyee commentedah... nevermind the previous post and patch (spoke too soon).
This patch resolves the error message and also presents a working all friends view.
Edit: the patch also has a leftover comment and call to devel's dd() that should probably be removed... sorry for not cleaning up after myself.
Comment #4
jon pughWorked for me.
++
Comment #5
sirkitree commentedThank you! http://drupalcode.org/project/flag_friend.git/commitdiff/3863c323ac90c87...
Comment #6
Anonymous (not verified) commentedWell the patch does not work for me! The error message is gone, but the "View All Friends" view display is empty. I double checked that the user has friends. Digging in the query I found out that the "… users.uid = 'IN (…" does not return a value while "… users.uid IN (…" does. Getting rid of the = and the ' ' around the subselect does the trick for me. I tried to fix this in the argument_numeric.inc file, but with little luck. It seams views add_where() function puts the = and the ' ' in by default.
Comment #7
sirkitree commentedHrm, yeah - seems like we need a different way to construct this. To be clear, the way we have it now, the WHERE that is generated is this:
created by:
but what we really want is this:
which was generated in D6 by:
So how do we do this in D7?
Comment #8
sirkitree commentedLooks like we need to use add_where_expression() instead of add_where().
http://drupalcode.org/project/flag_friend.git/commitdiff/afabdd346f05170...
This may run into problems if users try to implement the OR logic in the newer views ui.
Comment #9
jyee commentedYeah, the second patch i had above ("updated patch") had the add_where_expression(). Sorry, I realize that i wasn't particularly clear about that.
Comment #10
jon pughI had been working on this problem, and a number of other ones, and have rolled them up into one big patch.
see http://drupal.org/node/1101496
Sorry for grouping them up like this, but they are all critical issues and for my current project, which has an extremely limited time budget.
Pretty heavily tested so far.
Comment #11
jon pughforgot to mark as needs work... this patch still broken for me.
Comment #12
sirkitree commentedfixed in #1101496: Mutiple fixes in 7.x branch: Views handler, flag_friend_determine_friend_status(), delete friend