Closed (duplicate)
Project:
Organic Groups
Version:
6.x-2.0
Component:
Og Views
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Nov 2009 at 18:37 UTC
Updated:
4 Feb 2010 at 09:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
kb_0 commentedCan't find my original source on this patch so here is a copy. This is a patch to database.mysql.inc in d6 core that resolved your problem for us. If you use mysqli as a connector instead of mysql, you'll have to patch it instead.
Comment #2
tchurch commentedSorry to sound dumb but I have this problem too.
What does one do with the patch?
Comment #3
kb_0 commentedThe patch isn't particularly complicated... Instead, just open the file ./includes/database.mysql.inc and change the lines:
to:
This resolved the problem for us.
Comment #4
novacore commentedthanks kb_0, this worked for me too!
i had to change it in /includes/database.mysqli.inc
:-D
Comment #5
bonobo commentedHaven't tested this patch, as I'm not particularly excited about patching core...
We are seeing this as well, and here is some more detail:
For the group creator (ie, the person who created the group node, and is also the manager) the view works as it should.
However, for a user who joins the group and is promoted to group admin, the problem exists (ie, groups are listed twice).
This is not an issue for UID1.
Also, for others reading this thread, hacking core is a VERY bad idea. Kittens die when you do that.
Comment #6
el56 commentedUpdate:
I've been able to superficially eliminate the display problem within views.
I edited the view "og", subview "page":
.../admin/build/views/edit/og?destination=og#views-tab-page
Under "Basic settings" I changed "Distinct" to "Yes".
So far I haven't seen any unintended consequences, but I suspect that I'm just covering up the problem rather than fixing it.
I, too, maintain a safe fear regarding hacking core.
- Evan
Comment #7
bonobo commentedForehead <--> Palm!
That's a great workaround --
Like you say, it doesn't actually address the underlying issue, but it does make it go away.
Comment #8
bonobo commentedActually, setting the view to distinct did not solve this in my case.
The problem still exists.
Still not going to patch core to address this, though.
Comment #9
bonobo commentedThis is likely related to #284392: db_rewrite_sql causing issues with DISTINCT.
This is also discussed at http://www.lullabot.com/blog/views-distinct-node-access-problems
We built out a small helper module that works around this. It is working for us in a specific use case, but YMMV. The download is available off the FunnyMonkey site, and is linked from this comment: http://www.lullabot.com/blog/views-distinct-node-access-problems#comment...
Comment #10
marcp commentedLike bonobo said, this is a core issue and it needs more eyes on it. There are steps to reproduce this with minimal fuss here, but I think what would be most helpful would be for people to confirm that this is a problem with PostgreSQL as well as with MySQL.
If you are a pgsql user, please help out with the core issue, which is #284392: db_rewrite_sql causing issues with DISTINCT.
Comment #11
moshe weitzman commentedretitle. not fixable by OG
Comment #12
bonobo commentedSetting this to postponed (should this be a duplicate?) -- as this should be addressed via #284392: db_rewrite_sql causing issues with DISTINCT.
Comment #13
bluecafe commentedThe solution with distinct saved my day and solved my problem. Thanks a bunch!
Comment #14
momo18 commentedGroups repeated themselves twice in group directory, while using the following configuration.
Drupal 6.15
Views 6.x-3.0-alpha1
OG 6.x-2.0
panels, OG panels and more
Also using mysqli.
In core file database.mysqli.inc I changed the following line.
From:
To:
And the problem went away.
Needs fixing in core.
Comment #15
marcp commentedDuplicate of #284392: db_rewrite_sql causing issues with DISTINCT which is where you should provide feedback on the latest core patch.
Comment #16
mau-it commentedSubscribing.
Editing og view, as suggested in #6, was the solution for me.
Drupal 6.15 using mysql (not mysqli)
OG 6.x-2.0
Views 6.x-2.8
Comment #17
momo18 commentedIn organic groups, under my groups the exact same problem (refer to post #6) occurred at the destination og/my in which groups were appearing twice.
In the corresponding og_my view, selecting display type to "Page", and under "Basic settings" changing "Distinct" to "Yes" fixed it here as well.