Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#59041 closed defect (bug) (fixed)

Permit trashing patterns with draft status in post editor

Reported by: ramonopoly Owned by: isabel_brison
Priority: normal Milestone: 6.3.2
Component: Posts, Post Types Version: 6.3
Severity: normal Keywords: has-patch gutenberg-merge dev-feedback fixed-major
Cc: Focuses:

Description

First reported in https://github.com/WordPress/gutenberg/issues/53367

Since 6.3 it's not possible to trash wp_block custom post types that have a post_status of draft.

The wp_block post type has delete_published_posts in the capabilities array only.

Step-by-step reproduction instructions:

  1. Add a pattern in the post editor (wp-admin/edit.php?post_type=wp_block)
  2. Save it in draft status
  3. Go back to the list table
  4. Try to trash the pattern (the row action will not be there)

Attachments (1)

59041.diff (597 bytes ) - added by dhruvishah2203 3 years ago.

Download all attachments as: .zip

Change History (14)

This ticket was mentioned in PR #4987 on WordPress/wordpress-develop by @ramonopoly.


3 years ago
#1

Syncing changes from:

Adds delete_posts to the wp_block (patterns) capabilities.

Required to allow users to delete draft posts from wp-admin/edit.php?post_type=wp_block

See Gutenberg issue:

Trac ticket: https://core.trac.wordpress.org/ticket/59041

#2 @ramonopoly
3 years ago

  • Milestone 6.46.3.1

#3 @johnbillion
3 years ago

  • Version trunk6.3

@dhruvishah2203
3 years ago

#4 @ramonopoly
3 years ago

Does 59041.diff do anything different to the already-attached https://github.com/WordPress/wordpress-develop/pull/4987?

#5 @dhruvishah2203
3 years ago

I think it's a same @ramonopoly

#6 @audrasjb
3 years ago

  • Milestone 6.3.16.3.2

WP 6.3.1 is going to be released in the next few days, so let's move this ticket to 6.3.2 to give it more time to be committed and backported.

#7 @isabel_brison
3 years ago

  • Owner set to isabel_brison
  • Resolutionfixed
  • Status newclosed

In 56577:

Post Types: allow trashing draft patterns.

Adds delete_posts to capabilities for the wp_block post type.

Props ramonopoly, johnbillion, dhruvishah2203, audrasjb.
Fixes #59041.

@isabel_brison commented on PR #4987:


3 years ago
#8

Committed in r56577.

#9 @isabel_brison
3 years ago

  • Resolution fixed
  • Status closedreopened

Reopening this ticket so it can be backported to 6.3.

#10 @isabel_brison
3 years ago

  • Keywords dev-feedback added

This ticket was mentioned in Slack in #core by joemcgill. View the logs.


3 years ago

#12 @joemcgill
3 years ago

  • Keywords fixed-major added

Thanks @isabel_brison. The change in r56577 looks good to me.

#13 @audrasjb
3 years ago

  • Resolutionfixed
  • Status reopenedclosed

In 56777:

Post Types: allow trashing draft patterns.

Adds delete_posts to capabilities for the wp_block post type.

Props ramonopoly, johnbillion, dhruvishah2203, audrasjb, isabel_brison, joemcgill.
Merges [56577] to the 6.3 branch.
Fixes #59041.

Note: See TracTickets for help on using tickets.