WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
Authors with space in username are not remembered (6 posts)

  1. Ruben Schachtenhaufen
    Member
    Posted 3 years ago #

    Authors with spaces in their username, e.g. "fistname lastname", can't be added as co-authors, ie. they are not remembered after the post is updated. Authors with with no spaces in their username, e.g. "name", works just fine.

  2. MLmsw
    Member
    Posted 3 years ago #

    I find the solution for this bug :

    remove the line 418 in co-authors-plus file :
    $coauthors = array_map( 'sanitize_key', $_POST['coauthors'] );

    And don't forget to change the after line from :
    return $this->add_coauthors( $post_id, $coauthors );
    to
    return $this->add_coauthors( $post_id, $_POST['coauthors'] );

    After that the plugin just work fine !

  3. Mohammad Jangda
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks, I'll try to get this fixed up soon.

  4. Ruben Schachtenhaufen
    Member
    Posted 3 years ago #

    Thanks, MLmsw, that worked perfectly!

    @ Mohammad: Seems there's a problem with the sanitize function. Another posted had a similar problem with usernames like "name.name". Thanks for an otherwise great plugin!

  5. Mohammad Jangda
    Member
    Plugin Author

    Posted 3 years ago #

    This should be fixed in 2.5.2.

  6. Ruben Schachtenhaufen
    Member
    Posted 3 years ago #

    Works great. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic