Page 1 of 1

Unable to select s2Member user as post author

PostPosted: April 6th, 2011, 1:40 pm
by bdnonline
3.1 WordPress changed how author permissions are stored and which users are displayed in the author dropdown within a post. Right now, it only shows authors in that dropdown. What do we need to change within the s2member plugin to allow us to again select an s2member user as the author of the post?

Re: Unable to select s2Member user as post author

PostPosted: April 6th, 2011, 3:05 pm
by Cristián Lávaque
I searched the plugins directory and found this that maybe will help? https://wordpress.org/extend/plugins/post-author/

Re: Unable to select s2Member user as post author

PostPosted: April 7th, 2011, 7:46 am
by bdnonline
Thanks for the quick response. I should have given you more information. The problem is not with displaying an author on a post. When editing a post, users with s2member level permissions do not display in the author dropdown. This was not a problem before wp 3.1.

Re: Unable to select s2Member user as post author

PostPosted: April 7th, 2011, 12:11 pm
by bdnonline
The plugin user-role-editor fixed this problem. Thanks :>

Re: Unable to select s2Member user as post author

PostPosted: April 7th, 2011, 12:39 pm
by Cristián Lávaque
Great! Thanks for letting us know. I'll keep it in mind for the next one that asks this. ;)

Re: Unable to select s2Member user as post author

PostPosted: April 7th, 2011, 4:18 pm
by Jason Caldwell
Thanks for bringing this to my attention Cristián.

I believe this *could* be related to a bug in WordPress that looks for a level meta key instead of the capabilities meta key. I think this bug was first introduced when WP 3.0 was merged with WPMU. All of this is speculation at this point though. I've had this issue come up a couple times over the last month or two, and we'll be taking a closer look at this topic before the release of s2Member v3.6 to see if there is anything s2Member needs to do in the conformity department.

@TODO: investigate this code snippet found inside /wp-includes/user.php
Code: Select all
$qv['meta_key'] = $wpdb->get_blog_prefix( $blog_id ) . 'user_level'; 

Re: Unable to select s2Member user as post author

PostPosted: June 5th, 2011, 8:59 pm
by Jason Caldwell
( done, nothing wrong here; this is the expected behavior )
s2Member Roles and Subscribers have an internal WordPress® User Level of 0,
which excludes them from the list of authors in the post/page editors.

This is handled correctly. Although not ideal in every situation.

s2Member Roles and Subscribers are NOT Post/Page authors,
and this is the correct behavior. Seen in this routine.
Code: Select all
if ( 'authors' == $qv['who'] && $blog_id ) {
    $qv['meta_key'] = $wpdb->get_blog_prefix( $blog_id ) . 'user_level';
    $qv['meta_value'] = '_wp_zero_value'; // Hack to pass '0'
    $qv['meta_compare'] = '!=';
    $qv['blog_id'] = $blog_id = 0; // Prevent extra meta query
} 

The relevant section being:
Code: Select all
$qv['meta_value'] = '_wp_zero_value'; // Hack to pass '0'
$qv['meta_compare'] = '!='; 
* excluding Users with an internal User Level of `0`.

Re: Unable to select s2Member user as post author

PostPosted: January 2nd, 2012, 6:52 pm
by naimishbhagat
Hi Guys,

How to solve the above problem as in my website 54 users as S2member level 1 user and 3 users as administrator but in the author box I can see only 49users I dont know how to solve the problem. I change the s2member roles and user capabilities but it doesn't seem to show all the s2member users as author in the admin author box.

Please help.

Re: Unable to select s2Member user as post author

PostPosted: January 2nd, 2012, 8:33 pm
by blogjunkie
Hi everyone, I add s2Member users as post authors using this plugin: Co-Authors Plus

http://wordpress.org/extend/plugins/co-authors-plus/

IMHO I think it's better than listing all subscribers in the post authors drop down box because it will get unwieldy if the member list gets too long. Co-Authors Plus allows you to add authors with a live search.