Support » Plugin: Co-Authors Plus » [Plugin: Co-Authors Plus] Authors with space in username are not remembered
5 years, 10 months 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.
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 );
return $this->add_coauthors( $post_id, $_POST[‘coauthors’] );
After that the plugin just work fine !
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!
This should be fixed in 2.5.2.
Works great. Thanks!