I posted an item to a group and selected "public" as well since I want that item to be viewed via other links on my website. It works as expected. The item shows up on the home page, as well as in the group, but it appears in the group twice. It does not appear in other groups, which is good.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | og.module_11.patch | 1.08 KB | webchick |
Comments
Comment #1
webchickI swear I have already fixed this once... will look into it.
Comment #2
webchickHm. I can't duplicate this, using the most current version of OG 4.7 (line at the top of og.module reads: // $Id: og.module,v 1.110.2.84 2006/05/17 18:27:15 weitzman Exp $)
Can you confirm this is the version you're using? If so, could you detail the steps you're doing to get this behaviour?
Comment #3
Evan Leeson commentedI have an out-of-date version. I'll upgrade the module.
Comment #4
webchickConfirmed this is still an issue, on client's site anyway (so maybe a difference between MySQL 4 (duplicates the nodes) vs. 5 (doesn't)?). And indeed, my DISTINCT in og_get_home_nodes_sql from rev. 1.154 got wiped in rev. 1.174. Here's a patch to add it back in, which fixes the problem.
Moshe, was this removed for a reason?
Comment #5
webchickComment #6
RobRoy commentedFixes my problem. +1
Worthy of an commit I think. Can't see a reason to leave it out.
Comment #7
moshe weitzman commentedthe right place to add the DISTINCT is in og_db_rewrite_sql()
Comment #8
moshe weitzman commentedI can't reproduce this. i am logged in as a standard user
Comment #9
webchickMoshe, are you using MySQL 4 or MySQL 5? I wasn't able to reproduce either locally (PHP5+MySQL5) but definitely confirmed it on lectric's site.
Comment #10
moshe weitzman commentedI am using mysql5. surprising that this makes any difference. is that a mysql bug?
Comment #11
ncatchpole commentedI'm also getting this issue on a testing site - with the latest 4.7.0 and CVS. Running mysql 4.0.24.
Comment #12
ncatchpole commentedsorry for double post. webchick's patched worked fine when applied to cvs version of og.module
Comment #13
heine commentedPlease be careful; changing the title changes the title of the issue.
Comment #14
ncatchpole commentedsorry! my first post to an issue, now I know! Thanks for picking me up on it
Comment #15
ron collins commentedthis was still an issue for me in the latest 4.7 (// $Id: og.module,v 1.110.2.99 2006/06/18 17:54:37 weitzman Exp $)
the patch fixes the problem. i'll default to moshe here but i don't see how it could be fixed in og_rewrite_sql as he suggested.
Comment #16
ron collins commentedthere was a duplicate issue here http://drupal.org/node/88344 (which i have now closed) where i had posted a workaround for this a while ago which seems to work but moshe wanted a different solution.
moshe:
Comment #17
Andrupal commentedI've had the same issue using $Id: og.module,v 1.110.2.158 2006/12/20 08:09:39 m3avrck Exp $ as well as all its recent precursors...
I added DISTINCT to the two queries in function og_get_home_nodes_sql and the problem went away.
FYI I'm using mySQL 5.0.24, if it matters.
Comment #18
leamas commentedI am getting this duplication error and I do not know exactly where you are putting DISTINCT.
I don't see any function called og_get_home_nodes_sql.
Comment #19
digidoo commented...same issue here with recent version 6.x-1.4
The duplications of group nodes on ghp are only visible to group members.
Anyone any clue ?
Comment #20
Wuekkie commentedDitto here with 6.x-2.0. Anonymous and admin, 1 listing, any other roles, groups are listed twice.
Comment #21
davidmolliere commentedSubscribing.
I have the exact same issue, every post marked as public is listed twice on the group page.
Comment #22
BillyIdle commentedI have a similar problem that I think is related:
I am a maintainer of a fairly large site with almost 30 different content types, where some of these are group posts. All nodes posted in a group are set to public. We have a view with exposed filters for listing content on the site. After a major upgrade of the system nodes started to show up twice in the view (the Distinct flag for the view is set to "No").
After investigating the case, this is what I found: The nodes that show up twice are those that are posted into a group that the user is member of. I even tried posting a node to two groups that the test user is member of, and then it shows up 6 times.
Further investigation shows this was not not fixed by downgrading to og 1.3 or upgrading to 2.0, but is related to the drupal core version being updated from 6.13 to 6.14.
Comment #23
RWWood commentedDitto here. A non-superAdmin who creates a group sees it listed twice under his "My groups", and if he posts in the group, he sees the post twice. If I create a group or post as Admin, I only see the group or post listed once.
Comment #24
moshe weitzman commentedthe 6.14 issue is a core problem. there is a dupem in this queue as well.
Comment #25
Smallwolf commentedSo at this point there is no work around for this issue?
Comment #26
Tarsjusz commentedSame problem. Is there any other solution than DISTINCT in select?
Comment #27
ggevalt commentedSubscribing.
We have the same issue on our test site -- would like to resolve before implementing on our live version. Anyone know of a work around or patch being tested?
Additional info:
core 6.14
og 6.x-1.4
og content type admin 6.x-1.2
Comment #28
Firewolf commentedSubscribing.
Same problem on one of our project websites.
core 6.14
og 6.x-2.0
Comment #29
Tarsjusz commentedAfter upgrading views to 6.x-2.7 even solution with DISTINCT stopped working :|
Comment #30
Ether commentedsubscribe, as I have the same issue.
Comment #31
marcp commentedPlease test the core patch in #284392: db_rewrite_sql causing issues with DISTINCT (comment #257) and respond in that queue.
Comment #32
greg.harveyLatest patch is now #298, and I confirm it fixes the issue.
http://drupal.org/node/284392#comment-2282634