Page 1 of 1

Access restriction not working on a bare-bones install

PostPosted: August 18th, 2010, 2:17 pm
by kynatro
I seem to be having problems getting things working with a bare-bones WordPress 3.0.1 installation. I created a few posts and added one of the posts to the "Requires Member Level #0" post/page restriction list and the other three posts to the "Requires Member Level #1" post/page restriction list. The problem though is that when I go into another browser where no logged in session is active, I can still go to the page - its as though s2Member isn't even installed.

As mentioned, this is a bare-bones installation running on my local development environment. All I've done so far is get WordPress up and running and installed s2Member and WP Show IDs. I'm using the default TwentyTen theme.

Am I missing something here? All the documentation I've seen makes it sound like all I have to do is just what I did - install s2Member, enabled "Level #0" access, create some posts, and finally put those post IDs in the appropriate Post Access Restrictions lists and their access will be restricted. Do I need to modify my theme at all to manually include current_user_can() commands, because for the "easy mode" configuration method it doesn't indicate that this is a necessary step?

Re: Access restriction not working on a bare-bones install

PostPosted: August 18th, 2010, 2:28 pm
by kynatro
Note, this apparently does seem to be working for pages, but not for posts or custom post types.

Re: Access restriction not working on a bare-bones install

PostPosted: August 27th, 2010, 11:49 am
by Jason Caldwell
Hi there. Thanks for reporting back on this.
I sincerely apologize for the delayed response.


It sounds like your theme might be making calls to query_posts(), and not calling wp_reset_query() afterward. This can cause Conditionals in WordPress® to fail.

There are a couple of articles on this topic here:
http://webstractions.com/wordpress/undo ... set_query/
http://codex.wordpress.org/Function_Ref ... eset_query

Another related ticket, and how this can affect s2Member negatively:
viewtopic.php?f=4&t=88&p=1139&hilit=wp_reset_query#p1139

Re: Access restriction not working on a bare-bones install

PostPosted: August 27th, 2010, 12:05 pm
by kynatro
Actually, as I mentioned in the initial post, this is a stock WordPress 3.0.1 installation using the TwentyTen theme that comes with WordPress, nothing custom. I have verified that this theme does not use anything like query_posts() to modify the output of posts.

Re: Access restriction not working on a bare-bones install

PostPosted: August 27th, 2010, 1:31 pm
by Jason Caldwell
Gotchya. I totally missed that before. ~ Apologies.

I think you're seeing the Posts in an Archive, which is to be expected. That's the intended behavior. However, I realize this can be confusing, and updates, along with some new functionality are being addressed in the release of s2Member v3.2.3. A beta version is already available.

Please have a look at this thread, where I've also provided access to download the Beta release of s2Member v3.2.3, along with details about why this confusion occurs.
:D viewtopic.php?f=4&t=587#p2615

If none of this resolves the problem that you're having,
please contact me directly with a Dashboard login. I'll be happy to have a look for you.