For items that are created in a group, if the "Public" checkbox is selected, then that item appears twice in the og_ghp_ron. I am not sure why, I have looked at the view and cannot determine why this would occur. It did not occur on D-5.15, but when I upgraded to D-6.14, it started.

Comments

BenStallings’s picture

Version: 6.x-1.3 » 6.x-2.0

I'm having this problem with 6.x-2.0, and equally at a loss to explain it. Any ideas?

BenStallings’s picture

Category: support » bug

changing to a bug report, in case that will help it get attention.

jdtart’s picture

Another piece of information, but still no solution... when logged in as admin (user 1) or as the group admin, this behavior does not seem to be occurring for me. Only when logged in as a standard group member do I see the duplicates!

markuskb’s picture

I also have this problem, it can be reproduced by these steps:

- install Drupal (6.14) (and database, of course)
- enable Page and Blog as content type, set view & create permissions for authenticated users
- install og 6.x-2.0
- install views 6.x-2.7
- enable modules "Organic groups", "Organic groups access control", "Organic groups Views integration", "Views", "Views UI"
- go to Administer - "Organic groups" - "Organic group configuration" and define "Page" as "Group node" and "Blog entry" as "Wiki group post (any group member may edit)"
- in "Organic group configuration", select the options "New groups don't ... directory exclusively", "New groups don't ... form exclusively", "Required"
- go to Administer - Organic groups - Organic groups access configuration and select "Visible within the targeted groups and on other pages." and "New group home pages and default audience are always public."
- create a user, log in with that account and create a Page (which is a group).
- go to "/og/my" and now you will see two entries for your created group. Only groups which the current user has created will be shown as duplicate.

This should be the query which was generated for displaying the groups:

SELECT node.nid AS nid, node.title AS node_title, users.name AS users_name, users.uid AS users_uid FROM node node LEFT JOIN og_uid og_uid ON node.nid = og_uid.nid INNER JOIN users users ON node.uid = users.uid INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public') OR (na.gid = 1 AND na.realm = 'og_admin'))) AND ( (node.status <> 0) AND (node.type IN ('page')) AND (og_uid.uid = 3) )ORDER BY node_title ASC LIMIT 0, 50

Raising priority because this case has been open since September.

Anonymous’s picture

Priority: Normal » Critical

I've been testing out OG 6.x-2.0 and I experience the same issue. For any view for the currently logged in user who creates content I see a duplicate entry for every node created. However, if I log out, or login as a non-author of the node I don't see duplicates. Any idea as to when this issue will be dealt with?

Anonymous’s picture

Actually I'm even experiencing this issue with 6.x-1.4. It seems as though when OG Views module is enabled it creates all of the duplicate entries. Even though only one node is being created the views is showing two for the currently logged in user who created the node and group.

markuskb’s picture

Actually, it's the SQL query fetching the result to display which seems to be the cause. The data saved in the DB is not duplicated. In my above example, if you strip the

(na.gid = 0 AND na.realm = 'og_public')

from the OR clause, the groups are shown correctly.

Unfortunately, selecting "Distinct" in Views doesn't help for the affected views - the SQL keyword "DISTINCT" which is supposed to show up in the related query is mysteriously stripped away.

mathieu’s picture

Having similar issue, albeit with nodes associated to group. Trying to figure it out better, but this started happening after upgrade from og 1.x to 2.0. Subscribing...

EDIT: Issue fixed for me, was actually caused by #284392: db_rewrite_sql causing issues with DISTINCT.

markuskb’s picture

mathieu,
thank you for the link - it fixed also the issue for me!

Here's the link to the patch which worked for me:
http://drupal.org/node/284392#comment-2187006

Anonymous’s picture

Thanks! I can confirm that the patch works for me also.

mathieu’s picture

Status: Active » Closed (duplicate)

Changing to duplicate... Can you guys go to the other issue and update it with success stories? :-)

markuskb’s picture

Sure mathieu, did so! :)

PraetorianFX’s picture

this duplicate entry row come with permission Administration node, but i dont like it if authorize user set to "administer nodes permission" is enable... may day may daay..

Subcribe..

marcp’s picture

See #621274: Core bug - Group manager sees their group twice in <site>/og listing which will point you to the core issue mentioned above: #284392: db_rewrite_sql causing issues with DISTINCT where the latest patch is at comment #257.

AntiNSA’s picture

subscribing

marcp’s picture

No need to subscribe here -- go to #284392: db_rewrite_sql causing issues with DISTINCT and patch core.

amitaibu’s picture

Priority: Critical » Normal

removing tags.