Co-Authors Plus
[resolved] Some authors are not returned. (12 posts)

  1. manudurgoni
    Posted 2 years ago #


    I have problem with Co-Authors Plus 3.0.5 since I updated to WordPress 3.5.1. A large part of the authors are not returned when I want to assign author(s) to a post.

    But if in co-authors-plus.php, I comment the lines 890 to 908, the plugin returns the author(s) I want.

    $args = array(
    	'search' => $search,
    	'get' => 'all',
    	'number' => 10,
    $args = apply_filters( 'coauthors_search_authors_get_terms_args', $args );
    add_filter( 'terms_clauses', array( $this, 'filter_terms_clauses' ) );
    $found_terms = get_terms( $this->coauthor_taxonomy, $args );
    remove_filter( 'terms_clauses', array( $this, 'filter_terms_clauses' ) );
    if ( empty( $found_terms ) )
    	return array();
    // Get the co-author objects
    $found_users = array();
    foreach( $found_terms as $found_term ) {
    	$found_user = $this->get_coauthor_by( 'user_nicename', $found_term->slug );
    	if ( !empty( $found_user ) )
    		$found_users[$found_user->user_login] = $found_user;

    Do you have an idea of the problem?
    Thank you in advance,


  2. luis.lgaspar@gmail.com
    Posted 2 years ago #


    I have wordpress 3.5.1 and I found the same problem, missing authors...
    I am using version 3.0.4 of co-authors plus.
    If I comment the same lines referred in the previous post the problem is solved, but I am afraid of any undesirable side effect.

    Please help, thanks in advance.

    Luis Gaspar

  3. srcmax
    Posted 2 years ago #

    Same for me.
    Thanks for your help !

  4. grosso
    Posted 2 years ago #

    Same here. While trying to add co-authors, only a few of them appear on the suggestion list.

    I run WP MultiSite 3.5.1 with 3.0.5 version of plugin

  5. grosso
    Posted 2 years ago #

    I haven't tried that fix suggested above, a bit afraid of editing plugins on author behalf.

  6. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    Can you share details (e.g. user_login and user_nicename values) on which authors are returned versus those that aren't?

    Are there any patterns to which are returned and which aren't?

    Lastly, if you're proficient with using PHPMyAdmin or similar, can you see if there are 'author' terms for those users?

  7. grosso
    Posted 2 years ago #

    We have 38 users/authors on the system. Of them only 6 that have either editor or administrator privileges are suggested, the rest (all authors) are skept.

    That concrete login name independent. Just assigned one author Editor rights and he has immediately appeared on the suggestion list.

  8. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    @grosso Any chance you've been editing your user capabilities? Do the authors have the 'edit_posts' capability?

  9. grosso
    Posted 2 years ago #

    Yes, I did actually, we have installed User Role Editor (http://wordpress.org/extend/plugins/user-role-editor/).

    But should it matter what 'edit_post' capability a user has when I want he/she to add to a single static page editors list?

    The config we have here is that only editors may add/edit posts which automatically appears on the frontend and the rest - authors - may edit only their own static pages. That is the config we have is the one we want to have.

    Actually co-authors plugin used to work with the same user roles config, I got this problem with adding co-authors after we enabled MultiSite. I did not touch user roles for few years already and Co-authors coexisted with URE with no problems.

  10. grosso
    Posted 2 years ago #

    I confirm that adding 'Edit post' capability to Authors has fixed the problem. Though still confused, what to do if we want Authors to be able to edit pages only, and some pages are editable by the group of co-authors, that is whole point.

  11. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    Oh, I guess we made it filterable. You can remove the edit_posts cap and instead add this to your functions.php:

    add_filter( 'coauthors_edit_author_cap', 'capx_filter_search_cap' );
    function capx_filter_search_cap() {
    	return 'edit_pages';
  12. manudurgoni
    Posted 2 years ago #

    thank you for your answers, but I'm afraid that my problem is not yet solved.

    There are no differences between the user login and user_nicename of authors returned and those who aren't.

    About users_capabilities, it seems not to be related to my problem. Indeed, I have some admins who are returned, others not. Same for publishers, subscribers, etc...

    If I change the capabilities of an author to a publisher, it doesn't always appear in the list. So I think that my problem doesn't come from users_capabilities.

    I don't understand why authors aren't returned :/
    My WordPress is configured in French, maybe it's a lead ?

    I've a latest question, what is the table of the database where the plugin looks for the authors?

    Thank you in advance :)

    EDIT : By verifying in PHPMyAdmin, there is not the term 'author' attached to users. Maybe that the problem would come from here ? Is there a way to create this relation ?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Co-Authors Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.