PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Unable to select s2Member user as post author

s2Member Plugin. A Membership plugin for WordPress®.

Unable to select s2Member user as post author

Postby bdnonline » April 6th, 2011, 1:40 pm

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?
User avatar
bdnonline
Registered User
Registered User
 
Posts: 3
Joined: April 6, 2011

Re: Unable to select s2Member user as post author

Postby Cristián Lávaque » April 6th, 2011, 3:05 pm

I searched the plugins directory and found this that maybe will help? https://wordpress.org/extend/plugins/post-author/
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Unable to select s2Member user as post author

Postby bdnonline » April 7th, 2011, 7:46 am

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.
Attachments
s2memberauthor.jpg
s2memberauthor.jpg (19.27 KiB) Viewed 353 times
User avatar
bdnonline
Registered User
Registered User
 
Posts: 3
Joined: April 6, 2011

Re: Unable to select s2Member user as post author

Postby bdnonline » April 7th, 2011, 12:11 pm

The plugin user-role-editor fixed this problem. Thanks :>
User avatar
bdnonline
Registered User
Registered User
 
Posts: 3
Joined: April 6, 2011

Re: Unable to select s2Member user as post author

Postby Cristián Lávaque » April 7th, 2011, 12:39 pm

Great! Thanks for letting us know. I'll keep it in mind for the next one that asks this. ;)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Unable to select s2Member user as post author

Postby Jason Caldwell » April 7th, 2011, 4:18 pm

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'; 
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Unable to select s2Member user as post author

Postby Jason Caldwell » June 5th, 2011, 8:59 pm

( 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`.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Unable to select s2Member user as post author

Postby naimishbhagat » January 2nd, 2012, 6:52 pm

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.
User avatar
naimishbhagat
Registered User
Registered User
 
Posts: 1
Joined: January 2, 2012

Re: Unable to select s2Member user as post author

Postby blogjunkie » January 2nd, 2012, 8:33 pm

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.
User avatar
blogjunkie
Registered User
Registered User
 
Posts: 18
Joined: June 17, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: Majestic-12 [Bot] and 0 guests

cron