WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Co-Authors Plus] Authors with space in username are not remembered

[Plugin: Co-Authors Plus] Authors with space in username are not remembered

  • 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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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 !

    Plugin Author Mohammad Jangda

    @batmoo

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

    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!

    Plugin Author Mohammad Jangda

    @batmoo

    This should be fixed in 2.5.2.

    Works great. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Co-Authors Plus] Authors with space in username are not remembered’ is closed to new replies.