Duplicate entry INSERT INTO og_access_post
The reason for this is explained in detail here:
http://drupal.org/node/309974#comment-2594564
user warning: Duplicate entry ... for key 'PRIMARY' query: INSERT INTO og_access_post (nid, og_public) VALUES (..., 0) in ... common.inc on line 3528.
Here's the short version: This happened to me because og_access has a weight of 1, and workflow has a weight of 0. Workflow's save post action triggers a node_save() inside a node_save() which confuses the hell out of OG Access and causes it to insert the record twice. Increasing workflow's weight to 1 in the system table solves the issue.
I had a similar problem, but I couldn't find the module causing the problem so in the end the fix I used was to reduce the weight of the OG modules.
UPDATE system SET weight = weight - 10 WHERE name = 'og_access';
UPDATE system SET weight = weight - 10 WHERE name = 'og_actions';
UPDATE system SET weight = weight - 10 WHERE name = 'og_notifications';
UPDATE system SET weight = weight - 10 WHERE name = 'og_views';
Which took the values of weight on my system to:
og_access = -9
og_actions = -10
og_notifications = -10
og_views = -10
Comments