I enabled this module and then followed the link to rebuild permissions as directed. As soon as I do this anonymous users are denied access to all content types (they had full access pre-installation) even though I haven't set any permissions yet or settings for Content Access. I tried uninstalling and re-installing and am getting the same problem. Also half my main navigation menu disappears. I upgraded to Drupal 7.4 and also to Views 7.x-3.0-rc1 but this didn't make any difference. I don't have any other access modules installed.

Current versions:
Drupal 7.4
views 7.x-3.0-rc1
Content Access 7.x-1.x-dev (2011-Jul-08)

Comments

picsofle’s picture

I have the same problem.

Drupal 7.4
views 7.x-3.0-rc1
Content Access 7.x-1.x-dev (2011-Jul-08)

good_man’s picture

Status: Active » Closed (duplicate)

PLEASE search the issue queue before you ask.

#1115794: Conflict with views module

picsofle’s picture

Status: Closed (duplicate) » Active

After updating views to the latest dev version I have the same issue. Anonymous users only have access to forum, contact and search pages. At all other pages access will be denied.

maxweld’s picture

Priority: Normal » Major

I have the same behavior as picsofle.

good_man’s picture

I need from you the clear steps to reproduce this problem, I can't figure out what's wrong unless I see it on my machine.

bmango’s picture

Ok, I did a fresh standard installation of Drupal 7.4. I then installed content access 7.x-1.x-dev (2011-Jul-08). I rebuilt permissions. As soon as I had rebuilt the permissions anonymous users were denied access to content (I had just set up a home page). I didn't install any other modules.

picsofle’s picture

I also have a standard installation of Drupal 7.4. Content access was already installed before the update (working properly). After updating content access to 7.x-1.x-dev (2011-Jul-08) anonymous users only have access to forum, contact and search pages. At all other pages access will be denied.

Rebuilding permissions does not solve the problem.

skov’s picture

Also installed using latest dev for views, content_access, ctools. Access is denied if both "anonymous" and "authenticated user" are checked for "view any page content"

Seems related to #1212718: View any content does not work when the Anonymous + Authenticated are both checked

vizint’s picture

Same situation here...

As soon as I turn off "authenticated user" the "anonymous" access control begins to work properly.

hilldw’s picture

Having the same problem on this end with latest version of Content Access. Running 7.4 Drupal.

richH’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev

Hi,

having same problem as listed in http://drupal.org/node/1212718 which is the same as refered to in #8

Thanks
Rich

kmdesign’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

Replicated on my install as well, running D7.4.

Is there any other option for Content Type-level access restriction for D7 that I'm not aware of, or do I need to be patient and wait for the next dev version of this module?

Regardless, I'm appreciative of the work completed on this port thus far.

Thanks,
Matt

richardbporter’s picture

I'm having this problem as well after upgrading to D7.4 and CA7.x-1.x-dev. I had to disable CA to fix for now.

Sub.

MrPhilbert’s picture

Same here. This only applies to anonymous users. Any other roles that are created are not affected.
Did someone spell autenticatid wrong maybe?
Lord knows I have a tough enough time spelling it!
I have this on a production site and (fortunately) users are either anonamouse or in a dedicated role. Nobody is merely "othentacated".
Looking forward to a fix though as this is a great module.

Thanks for the module and I hope you at least got a little chuckle here.

MrPhilbert

yaworsk’s picture

Assigned: lyd » Unassigned

subscribing... not much more I can add, same version of Drupal and views. can't see any nodes but can see blocks so long as they aren't related to nodes (i.e., client has a bunch of blocks with custom html content). I am able to see other entities like Profiles created by Profile2 module and so my views showing profile2 information still work.

**EDIT: I went into a few content types and removed authenticated but it didn't work.

lyd’s picture

Assigned: Unassigned » lyd

I'm having the same problem after upgrading to Content Access 7.x-1.x-dev version from July 8.
Was already using Core D7.4 with no problems before the upgrade.

Since the Content Access upgrade suddenly access is denied anonymous users.

Going into into each content type and removing Authenticated solves the problem.

It is an excellent module, and hopefully this problem can be solved soon.

oriolo76’s picture

Assigned: Unassigned » lyd

On D7 disabling the Content Access module allows accessing from anyone, but of course this is not a solution.
Still waiting for this very important patch.

GalainHH’s picture

Assigned: lyd » Unassigned
StatusFileSize
new137.94 KB
new116.81 KB

As far as I can say:

EVERY SAVING of a node writes wrong permissions for the node into the node_access table. (see attachment)

In column "realm" is the value "content_access_all". If I set the value manually to "all" the node is accessibly by anyone.

DO NOT REBUILD PERMISSIONS, this will result in all nodes having the realm "content_access_all". (see attachment)

GalainHH’s picture

I don´t think this has anything to do with views, as I have this error an all nodes

oriolo76’s picture

No relation with views. About #18, there is also a worse case: when you modify something, that node becomes no accessible again (since the realm is set to 'content_access_all' after any modification).

GalainHH’s picture

Yes, that's exactly what I wanted to say with

"EVERY SAVING of a node writes wrong permissions for the node into the node_access table"

:-)

3cwebdev’s picture

Same issue here. Subscribing for solution.

MrPhilbert’s picture

Come to think of it, that's what got me started. I modified a node, saved it and it disappeared from view.
When I rebuilt permissions, everything disappeared.

Does reverting to previous version of CA solve the problem?

Vasu’s picture

#16 works. Thanks lyd.
De-selecting 'view any ### content' for 'authenticated user' (and keeping the selection for 'anonymous user') in any content type makes that particular content type visible again to anonymous users.

P.S.Initially tried deselecting 'view published content' for 'authenticated user' in drupal global permissions, but did not solve the problem.

oriolo76’s picture

if we apply #16 it works for anonymous users, but for the authenticated ones the problem still remains open!

wjaspers’s picture

Subbing. Menu entries are also prevented from being seen because of this.
I agree with #20.

On lines 507-512 of content_access.module, you'll see:

  // Detect if all are allowed to view
  $all = array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID);
  if (count(array_diff($all, $rids['view'])) == 0) {
    // Grant view access to all instead of single roles
    $rids['view'] = array('all');
    $grants['all'] = array('realm' => 'content_access_all', 'gid' => 0, 'grant_view' => 1, 'grant_update' => 0, 'grant_delete' => 0, 'priority' => content_access_get_settings('priority', $node->type));
  }

If we change the $grants['all'] realm to "all", this should be correct. I think what's happening is "content_access_all" was just a typo left-in following other naming conventions throughout this module.

I'll generate a patch sometime today.

wjaspers’s picture

Status: Needs review » Active
StatusFileSize
new804 bytes

Give this patch a try.

MrPhilbert’s picture

You folks are fast

patricko67’s picture

Patch from #27 appears to be working for me after permissions rebuild. Thanks!..

wjaspers’s picture

Status: Active » Needs review

Forgot to set the needs review flag for #27.

picsofle’s picture

Patch from #27 works for me too. Thanks!

MrPhilbert’s picture

Great patch and a terrific, quick response!

Thanks

yaworsk’s picture

Confirmed, patch form #27 worked for me. Thanks wjaspers!

oriolo76’s picture

Status: Active » Needs review

It works also in my case. thank you to all.

wipeout_dude’s picture

Mostly just subscribing because I bumped into this problem today..

Not sure what to do with the patch on post 27..

How long does it usually take for patches to get into the downloadable module?

I don't need it right now but will soon so I can disable Content Access until a new version with the patch is available..

Thanks for a great module, combined with ACL it looks like it will give me the full permissions control I am looking for..

bmango’s picture

#27 has fixed it for me. Thank you very much!

MrPhilbert’s picture

StatusFileSize
new29.68 KB

Use Netbeans to patch.

Till then, here is the module that I patched.

yaworsk’s picture

Additionally, this patch is pretty simple so you could open up the .module file and do it manually. The - beside the first line means delete that line in the code and + means to add that line in... the other lines referenced in the patch are contextual and shouldnt' be touched, they just help identify where in the code the changes are required.
pete

jim22’s picture

Patch #27 worked for me! Thank you all.

itangalo’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #27 works fine for me too. Changing issue status.

MichaelCole’s picture

see also: http://drupal.org/node/1212718

Verified bug in D7 with dev version from today.

Patch works for me. Thanks :-)

MichaelCole’s picture

robciu’s picture

Patch #27 worked for me too. Thanks a lot.

merlin2288’s picture

subscribing

good_man’s picture

Status: Reviewed & tested by the community » Needs work

I can't accept patch in #27 since I changed it in #239139: Do not hijack the 'all' realm I'll try to find what's going wrong.

xlyz’s picture

subscribing.

shouldn't this be critical?

grossmann’s picture

subscribing

mrharolda’s picture

The patch in #27 solved some(/all?) issues here too!

ngstigator’s picture

Also confirm that patch #27 resolved issue.

MichaelCole’s picture

Priority: Major » Critical
underwearninja’s picture

Patch in #27 fixed things for me after a rebuild of perms. Thank you.

yaworsk’s picture

Good to have confirmation about the patch working but it still doesn't conform with good_man's comments about hijacking the 'all' realm in #45. I think we should be turning our attention to that now rather than continuing to confirm/test the patch.

Anonymous’s picture

I was using this module without issues until a few days ago, probably after an update. Suddenly, both anonymous and authenticated users have no valid content access rights (after a rebuild action).

Using the devel node access module, I saw this for anonymous user:

node prio status realm gid view update delete explained
 31423 10 missing content_access_all 0 1 0 0
 
Mouseover hover: "should be in [{node_access}but isn't!"

You have errors in your {node_access} table! You may be able to fix these for now by running Rebuild permissions, but this is likely to destroy the evidence and make it impossible to identify the underlying issues. If you don't fix those, the errors will probably come back again. 
DON'T do this just yet if you intend to ask for help with this situation.

Anonymous (not verified) (user 0) can use these grants (if they are present above) for view access: 

all: 0
 content_access_author: 0
 content_access_rid: 1

As it says, content_access_all is an invalid setting.
Now tried #27 and it seems to be the solution.

Maybe take down the D7 module for now, since it's really dangerous to use?

good_man’s picture

@morningtime: the module is in *dev* so that means don't use it on production sites, ever.

good_man’s picture

Commit reverted, please retest and tell me if it the bug is gone.

MichaelCole’s picture

I arrived at this problem by this bug: http://drupal.org/node/1227090#comment-4769836
Solution was to disable all "pages" in page manager and start enabling them till it worked again.

jesss’s picture

Subscribing

kevin-bcr’s picture

Subscribing

Taxoman’s picture

Subscribing

mtift’s picture

Subscribing

gapple’s picture

Status: Needs work » Closed (duplicate)

This issue was caused by a commit for #239139: Do not hijack the 'all' realm, which has since been reverted and should be resolved by updating your module to the latest dev version.

jesss’s picture

Status: Closed (duplicate) » Active

I just updated to the latest dev version (released August 9), and anonymous users are still denied access to all content.

gapple’s picture

@jesss have you used devel module to check the node access records stored in the database? Did you rebuild permissions after updating?

wipeout_dude’s picture

For me 7.x-1.2-beta1 appears to be working fine as long as the "book navigation" block is disabled completely.. The block is not critical for me but access control is..

jesss’s picture

Simply rebuilding the permissions didn't work, but disabling and re-enabling the module, then rebuilding permissions again seems to have done the trick. Thanks!

gapple’s picture

Status: Active » Closed (duplicate)