I am wondering if it is an intended behavior, a module's bug, or a conflict in my config.

If I set the default public checkbox for a given node type, any node of this type is set to public, and there is no way to uncheck this checkbox at the node level. All nodes of that type are public forever.

I would have thought the "Default" means the initial setting, that can then be changed on a case by case basis.

Other OG settings handled by this module have an additional check for hiding the setting so it is enforced, but this is not the case for the public check box, hence my trouble.

Thanks for help

Comments

jvieille’s picture

This really annyng bug can be simply fixed in og_defaults.module, function og_defaults_form_alter around line 500 (I have also formatted the if statement for more clarity)

This basically checks if a nid is assigned, so only new nodes get the default value instead of sytematically altering also the edited nodes. (without this change, if you don't uncheck manually a private node, it becomes public!)

        // Public Checkbox
        if (in_array($node->type, array_filter(variable_get('og_public_'. $group->type, array())))) {
          if (
            in_array($node->type, array_filter(variable_get('og_audience_'. $group->type, array())))
            || (is_array($form['og_nodeapi']['visible']['og_groups']['#default_value'])
              && count(array_filter($form['og_nodeapi']['visible']['og_groups']['#default_value'])) > 0
            )
+         && !isset($node->nid)
          )
          {
            $form['og_nodeapi']['visible']['og_public']['#default_value'] = 1;
          }
jvieille’s picture

Category: Support request » Bug report
Issue summary: View changes
Status: Active » Needs review