Sadly, I had to disable this module from http://boston2008.drupalcon.org/sessions because of this bug.
This Bookmark: Ops field in Views (see views_bookmark_nodes table definition) shows an arbitrary value because its value is never filtered for the current user. I think the current user should be added to the JOIN with the views_bookmark_nodes table. This should probably happen in the query handler for this field.
I tried to fix this but a bit lost in the query handler. Help moofie!
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | vb_ops.diff | 11.58 KB | mooffie |
Comments
Comment #1
moshe weitzman commentedActually, we should probably move the 'Bookmark: Ops for @s' field to a new pseudotable that has an 'extra' clause that adds the JOIN on uid = ***CURRENT_USER***. this will cause the least interference with other filters and arguments.
Comment #2
mooffie commentedI'll work on this today.
Comment #3
mooffie commentedOh, nice! Views_bookmark will be perfect for this! :-)
That's correct.
I'm attaching a patch. (You should apply it to the latest CVS. But, you know, don't do this on a live site --I did test it numerous times, but maybe it won't be the final patch.)
I decided to add a new [pseudo] table. I did a lot of thinking about this, and finally came to the conclusion that it's the better and clearer route.
Yes, that's what I did.
That's a by-product, but it actually wasn't my prime rationale.
Notes:
'table' => 'views_bookmark_nodes_$bookmark->vbid'line --note the *single* quotes.)Comment #4
moshe weitzman commentedtested and verified to work. i didn't test upgrade path but i think that can be fixed (or ignored - re-adding a field is easy) later. thanks much.
i think moofie deserves commit rights on this module if he/she wants them.
Comment #5
mooffie commentedOh, thanks for the compliment :-)
But I want to prove myself some more before I ask to be a co-maintainer.
BTW, I've just posted a How to setup a "Who's boorkmarked this" tab recipe.
Comment #6
quicksketchI'm alright with this patch also, just a small concern. Will this adversely affect users that already ran update_5100 to run update_5101?
Comment #7
mooffie commentedIt's safe to run 5101 multiple times, so it won't adversely affect users who already run 5100.
Comment #8
quicksketchFantastic. Committed. Thanks again mooffie!
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.