Closed (fixed)
Project:
Views Bookmark
Version:
5.x-1.x-dev
Component:
Views integration
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Feb 2008 at 01:01 UTC
Updated:
24 Mar 2008 at 10:33 UTC
I've created a view in which a list of node titles is displayed, sorted by "Bookmark: favorites Count" and then "Bookmark: favorites Marked Time". If I just do favorites count, the view behaves as expected. However, the Marked Time allows for the same node to be listed multiple times
Comments
Comment #1
mooffie commentedThis isn't a bug. A node may be bookmarked by several users, so the node (the record) repeats itself for each bookmarking user. You'll understand the rationale if you switch to the Table, or List, style and add the '... Marked Time' field.
But I see that the description says "Sort by the time a node was last bookmarked using [...]" and this is indeed misleading.
Add the 'Node: Distinct' filter. I believe that, because of the sort, the database will indeed pick the "last bookmarked" record. Let us know if your problem was solved.
Comment #2
dnguyen commentedI just added the Node:Distinct filter and it did not affect the duplicate listing.
If the "marked time" doesn't do as the description says...perhaps in a later version, that should be an included criteria? I like having it because if there are nodes that have the same number of bookmarks, that is one way to sort it out.
Comment #3
mooffie commented(BTW, you'd better use the 'dev' version, not the '1.4' one.)
I've checked this issue further.
It turns out 'Node: Distinct' has no effect in this case.
Have you considered sorting by 'Node: Updated Time' instead?
Or, enable the built-in 'statistics' module and sort by 'Node: Total Hits'.
That would entail recording the 'last bookmarked' timestamp somewhere. We could follow Drupal's {node_comment_statistics} example and store this information in our{views_bookmark_node_count} table (after renaming it to {views_bookmark_node_statistics}).
And since sorting by 'last time bookmarked' would be different than sorting by 'time bookmarked', we will have to have two sets of sorts/fields, something which will confuse the admin.
But the problem isn't technical. The problem is of essence: I don't see why this feature is useful. I had a somewhat positive opinion of this feature when I started typing this reply, but the more I think of it the more useless this feature seems to me. I guess you have a 'Posts popularity' view and you want to sort all those nodes bookmarked by '1 users'. There are several reason why 'last bookmaked time' doens't have a tangible advantage over the alternatives I suggested above. I'm trying to think of other, useful use-cases for this feature, but I don't see any.
(I shell fix this as soon as some other patch gets in.)
Comment #4
mooffie commentedSo this part is "won't fix". If anybody thinks otherwise he may reopen this issue.
I fixed that (simply removed the word 'last'.)
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.