Opened 22 months ago

Last modified 4 months ago

#18264 new defect (bug)

Future private posts listed as already published with future date specified

Reported by: chrisrudzki Owned by:
Priority: normal Milestone: Awaiting Review
Component: Administration Version:
Severity: normal Keywords: needs-patch ux-feedback ui-feedback editorial-flow
Cc: westi, kovshenin, danielbachhuber

Description

Setting a post to private, and scheduling it for some future date or time, results in the stamp that the post was "Published on (future date)" in the publish module.

The discussion on tickets #5608 and #9136 suggests that all private posts are published immediately (and privately), and that this is intentional. So, it's misleading and confusing to report that it already was published on some future date.

In source:trunk/wp-admin/includes/meta-boxes.php#L163, I suggest we replace:

else if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published
		$stamp = __('Published on: <b>%1$s</b>'); }

with:

else if ( 'publish' == $post->post_status ) { // already publicly published
		$stamp = __('Published on: <b>%1$s</b>');
	} else if (  'private' == $post->post_status ) { // published privately
		$stamp = __('Published privately'); }

Change History (10)

  • Keywords needs-patch added
  • Keywords ux-feedback ui-feedback added

Yeah, this is a UI issue. A post cannot be both future-scheduled and privately published.

I think the whole concept of Privately Published is wrong, and we should re-evaluate it completely. The way that language is used on wordpress.com (private to the group of your choosing) makes a lot more sense. Saving content so it's viewable only to author/admin is more like a private save. If no one else can view it, it's not really published in the normal sense, right?

I just ran into this exact issue myself. Ideally, we would deprecate the "private" status altogether and leave it to plugins to implement "publish to group" or whatever else they need using taxonomies.

My quick fix for not showing future private posts on the front-end:

function fix_future_private( $sql, $wp_query ) {
	global $wpdb;

	$sql .= $wpdb->prepare( " AND $wpdb->posts.post_date <= %s", current_time('mysql') );

	return $sql;
}

if ( !is_admin() )
	add_filter( 'posts_where', 'fix_future_private', 10, 2 );
Last edited 14 months ago by scribu (previous) (diff)
  • Cc kovshenin added
  • Keywords editorial-flow added
  • Cc danielbachhuber added

@kovshenin maybe we can assess this as a part of editorial flow user testing and make a decision what should be done. Personally, I think "Privately Published" is confusing but I don't know that deprecating it is the right answer.

It's also odd that the "View Page" link doesn't show:

https://www.evernote.com/shard/s2/sh/19ee21df-43b5-44d0-962c-5b6bb5c0cf47/e85c6956632df3e9806fc488c97247e0

comment:10 in reply to: ↑ 9   kovshenin4 months ago

@danielbachhuber I agree, though I don't think deprecating the post status is the way to go. I think it can live, but perhaps it should become like any other post status, and not a UI of its own. I also think that scheduling a transition from one post status to another should work, regardless what the two statuses are, so the new statuses API (as discussed) should be flexible enough to support this.

Note: See TracTickets for help on using tickets.