Closed (duplicate)
Project:
Organic Groups
Version:
5.x-4.3
Component:
og.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Aug 2007 at 16:02 UTC
Updated:
16 Mar 2009 at 17:56 UTC
Jump to comment: Most recent file
Comments
Comment #1
dwwMoving to the right queue. OG Project is only about integrating OG and project.module (well, at this point, really project_issue.module).
Comment #2
moshe weitzman@drupal.org commentedgood advertisement for your patch :)
i'll try to review that patch and push it along. i won't commit this until that one is in.
Comment #3
douggreen commented@dww, sorry
@moshe, thanks!
Attached is a slightly updated patch that removes one line of code. The default join type is 'inner', so this line was not needed.
Comment #4
Christefano-oldaccount commentedThis will be very useful. Thanks, Doug!
Comment #5
Bevan commentedRe-rolled patch for head
Comment #6
moshe weitzman commentedlooks to be missing the is_active check for a subscription
Comment #7
douggreen commentedThanks! I missed that og_uid had this field. I added
ou.is_active > 0to the SQL WHERE clause. The> 0check will catch everything, and there's really no benefit to making the check less restrictive, but I scanned og.module and see= 1and>= %d, while my database only has 1 for this value. Can this value every be anything besides 0 or 1?Comment #8
moshe weitzman commentedlooks fine now
Comment #9
Bevan commentedThis version uses now-kinda-standard capital "OG" in the UI text.
Comment #10
Antinoo commentedI'm using OG 5.x-5.4 on Drupal 5.7, but it seems i cannot make these patches work. :(
user warning: Unknown column 'og_count' in 'order clause' query: SELECT DISTINCT(node.nid) FROM node node WHERE (node.type IN ('og_user_roles_subgroup','group')) ORDER BY og_count DESC LIMIT 0, 10 in includes/database.mysqli.inc on line 151.og_count should be in the SELECT clause.
It seems that the $query->add_subquery() isn't called.
Only the ORDER BY clause is updated (maybe using that $query->orderby[], but I'm not sure the handler is called at all!).
I don't know how to make the patch work.
Some hours ago, I opened a topic forum at http://drupal.org/node/230773
Comment #11
douggreen commentedDid you remember to patch views with #143888?
Comment #12
Antinoo commentedI'm using drupal 5.7, og 5.x-5.4, views 5.x-1.6. Nothing is patched.
It seems all goes patched ok.
But when I create a new view, the
OG: Group: Subscriber Countfield is still not sortable. :(I'm a new Drupal user, should I make other things to apply the patch?
However, I'll try to retry with a fresh installation and to look into the code during the week.
Comment #13
mr.andrey commentedHmmm... the patch seems to install fine, the option shows up under the Sort Criteria, but the sorting doesn't actually take place (see attached screenshots).
Comment #14
moshe weitzman commented@mr. andrey - you have to patch Views and OG for this to work ... still waiting on Views for this.
Comment #15
mr.andrey commented@moshe, ah, I see.
I tried to patch views with http://drupal.org/node/143888#comment-815243, which made no difference.
Thanks,
Andrey.
Comment #16
seth97 commented@mr.andrey
instead try the patch:
http://drupal.org/node/143888#comment-555015
Comment #17
mr.andrey commentedAh, got it. That worked.
Is that patch eventually going to end up included in views? Do you know?
Thanks,
Andrey.
Comment #18
droople commentedAny news on this ??
I am desperate for this... I have no clue how to patch.
Can I have a patched VIews module and OG module
Thank you
Cheers
Comment #19
halfiranian commentedJust to confirm I've got it all working well with the latest two patches.
One thing to note: make sure you clear the cache (easy with the devel module) so that you can see the 'subscriber count' sort criteria after you've patched og_views.inc.
Droople, there's info on how to patch at: http://drupal.org/patch/apply
Comment #20
moshe weitzman commentedThe real fix is under discussion at #336500: Og Statistics Module
Comment #21
moshe weitzman commentedMarking this is a dupe as I have no intention of committing it. Folks are welcome to use the patches here, of course.