I recently installed og_abt and enabled the main og_abt module. Once I did this my users were no longer able to view (new) content created after this module was created. The odd thing is that users with the "Administer Nodes" permission could view the node. What is even odder is that these same administer node users could not see those nodes in any basic views.

I then rebuilt the node permissions and all users were now able to view the nodes directly, however they still were not able to view the nodes in basic views.

OG is the only node access module I use so I'm at a loss.

Comments

jide’s picture

Priority: Normal » Critical

I had this problem (on a production site :( ), this is because of the "Public" checkbox : when you create a new content and do not affect a group to the node, the "Public" checkbox is unchecked. Normally, this does not affect the node, but it seems that og_abt does set "og_public" to FALSE in this case, although it should not.

A quick fix for this is to use the nodeapi hook in a custom module :

function MYMODULE_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  switch ($op) {
    case 'presave':
      // Set OG Public value to TRUE if no groups !
      if (empty($node->og_groups) || $node->og_groups[0] == 0) {
        $node->og_public = TRUE;
      }
      break;
  }
}

I set this to critical.

darkodev’s picture

Thanks to @jide

We enabled this module, did a brief test and didn't see anything amiss at first, then we found that some nodes had lost their "public" status. We seemed to be forced to choose a group at random, then check the "public" box. With the above nodeapi hook, you can do a mass node save, which should fix your issues.

If you're going to use this module on an site with existing nodes, we strongly suggest you carefully test many nodes against their known good og status.

Love the idea behind this module.