Ticket #1142 (closed defect: fixed)

Opened 3 months ago

Last modified 8 weeks ago

Publish fails for all roles lower than site-admin (2.8.5.1)

Reported by: kgraeme Owned by: somebody
Priority: highest Milestone: 2.8.5
Component: Administration Version:
Severity: blocker Keywords: publish, roles
Cc:

Description

When a user tries to publish or save a draft of a new post they get an error of "You cannot make this user the post author."

The post is saved as a draft. The post and then be edited and published or saved as draft without error.

Attachments

mu.php Download (50.1 KB) - added by kgraeme 3 months ago.
Proposed fix to author sanity check

Change History

Changed 3 months ago by kgraeme

mu.php line 1264

function post_author_sanity_check() {
	global $wpdb;
	$blogs = get_blogs_of_user( $_POST[ 'post_author' ] );
	if ( isset( $_POST[ 'post_author' ] ) && false == is_site_admin( $_POST[ 'post_author' ] ) && false == isset( $blogs[ $wpdb->blogid ] ) ) {
		wp_die( __( 'You cannot make this user the post author.' ));
	}
}

Changed 3 months ago by kgraeme

Proposed fix to author sanity check

Changed 3 months ago by kgraeme

The attachment just changes the logic to "if NOT the post author then fail".

Changed 3 months ago by donncha

  • status changed from new to closed
  • resolution set to fixed

That fix simply disables the code. I fixed the problem in [1987]. Guess it's time to tag a number minor version.

Changed 3 months ago by ocean90

  • status changed from closed to reopened
  • resolution fixed deleted

When I as the site-manager save or publish a post the first time it works fine. But if I want to save or publish the post the second time I get the error "You cannot make this user the post author.". Can anyone confirm?

I use 2.8.5.2.

Changed 3 months ago by tmoorewp

  • status changed from reopened to closed
  • resolution set to fixed

The fix is in the /wp-admin/includes/mu.php file. You can grab it from  http://trac.mu.wordpress.org/browser/branches/2.8/wp-admin/includes/mu.php

Changed 8 weeks ago by jamescollins

  • milestone set to 2.8.5
Note: See TracTickets for help on using tickets.