I have created a site which will both have a public part and a closed community part.

I created a view and a page to display public content. I checked the "access content" in permissions for the "node module" under "anonymous user." I made sure that the page did not have any special access requirements.

Yet, when I try to access the page it sends me to the login (user?destination=home) screen.

What am I missing here? Any special Drupal Commons settings that force user login on all pages? The page works when logged on.

Thanks for a otherwise amazing piece of software - Forza Drupal =)

Comments

mstef’s picture

There is a setting that forces all users to be logged in. This is convenient if Commons is serving as a private community - like for a business. As the admin, navigate to admin/settings/commons. You'll see a checkbox for forced login.

batsonjay’s picture

There's actually two steps (right, Mike? ;-)

The complete answer is here: http://commons.acquia.com/wiki/enabling-public-access-your-community-site

mstef’s picture

Yep but nextmola took care of it

I checked the "access content" in permissions for the "node module" under "anonymous user." I made sure that the page did not have any special access requirements.

Crom’s picture

Issue tags: +Drupal Commons

Interesting thread and exactly what I'm working on.

Is there a way of overriding the forced login checkbox for a couple of pages or a content type, when using Commons.

All I want is a few pages and maybe a couple of views visible to anonymous - as an introduction to what the site does.

But ideally I would like to retain the actual commons functionality within the "secure zone". I'm playing around with multi-sites but feel there must be a simpler way.

Any thoughts?

mstef’s picture

Status: Active » Closed (fixed)

You would have to disable the forced-login setting that comes with Commons and implement your own handler. It's very simple. Take the relevant code out of commons_init(), copy it into a custom module, and don't force the redirect if you're on the few URLs you want to keep open. You can use $_GET['q'] to return the whole path after the base - eg, www.site.com/content/blogs would be 'content/blogs'. Or use arg(0), arg(1), etc..

Let me know if you need a hand

Crom’s picture

Mike, that's a real help. I'll give it a go. Thanks v much!

jalake’s picture

Version: » 6.x-2.9

Thank you for this thread. I was getting a redirect loop trying to login with OpenID. Turing off the forced login check in the Commons settings was exactly what I needed but could not find.