I can't seem to get a content type that I set as an "Omitted content type" on the Organic groups configuration page to show up for anonymous users. I do have the multiple_node_access patch correctly applied. The content type I called "Page No Group" only uses Domain Access and is an Omitted content type within OG, but it doesn't show up for anonymous users. The content type that is not omitted on the Organic groups configuration page and is selected to also be public does correctly show up for anonymous users. It also correctly shows only on the domains selected within the Publishing options. I may be wrong, but I was expecting the node_access table to use "all" for the realm of nodes that only use Domain Access and not a combination of OG and DA. Maybe I'm missing something?

Here is some relevant information:

  • MySQL 4.1.18
  • PHP version 5.2.4
  • Clean Install of Drupal 5.x-dev
  • Only Modules present and installed are:
    • Domain Access - 5.x-1.2 - 2008-Mar-30
    • Organic Groups - 5.x-6.0-rc3 - 2008-Mar-31
    • Views - 5.x-1.x-dev 2008-Jan-21
  • Only the Domain Access module is installed
    • with multiple_node_access patch applied and "Check Domain Access in addition to other modules (AND)" checked.
    • 2 Domains properly working and pointing to same IP
  • For the Domain Advanced settings I have the following selected:
    • Domain-based editing controls: Do not use access control for editors
    • Node access settings: Check Domain Access in addition to other modules (AND)

Does it look like I did anything wrong? Of course I'm willing to follow up if you can help me de-bug this problem.

I did a quick screencast to show what I have selected and show the problem here: http://screencast.com/t/Ip9WPAXG

Thanks!

Comments

agentrickard’s picture

Category: bug » feature

This came up before, and it has to do with how Drupal handles node access records.

The issue, I believe, only occurs if you are trying to use the AND behavior after applying the patch.

If multiple node access modules are present, Drupal removes the 'all' grant from the database. DA uses the 'domain_all' grant in some special cases, but not for nodes not assigned to an OG group.

One solution is provided by gcassie at http://drupal.org/node/234087#comment-788876 -- copy that function into a new module and enable it.

There are other ways of solving this issue, but they all involve code. It may be necessary to release a small module that fixes this issue -- so I am changing this to a feature request.

By the way, this is the best bug report ever!

agentrickard’s picture

Title: Anonymous users can't access content type that are not also OG Content Types » OG: Can't access content type that are not also OG Content Types
solutiondrop’s picture

Thanks for giving a solution so quickly. The solution by gcassie worked well. I'll report back here if anything else comes up concerning this.
Thanks again Ken.
Scott

agentrickard’s picture

To be clear. gcassie's solution is perfectly correct. The question now is: should we distribute the solution as part of the module?

solutiondrop’s picture

I just wanted to add that I have been using and testing with gcassie's solution these past 4 days without any problems. +1 to distributing the solution as part of the module. It would be great to have it. Thanks again for such a useful module.

agentrickard’s picture

Status: Active » Closed (fixed)

Thanks.

Discussion moved to http://drupal.org/node/234087