Make WordPress Core

Opened 4 years ago

Last modified 8 weeks ago

#33172 reopened defect (bug)

Notice in get_bulk_actions() in certain conditions

Reported by: CreativeJuiz Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Quick/Bulk Edit Keywords: bulk-reopened
Focuses: administration Cc:


Hi there,

When a custom post type declaration is made with custom capabilities, the delete_posts cap can be missing.

If it's the case, the get_bulk_actions() function create a PHP Notice saying the following:

Notice: Undefined property: stdClass::$delete_posts in /wordpress/wp-admin/includes/class-wp-posts-list-table.php on line 251

To prevent and avoid this notice, I simply use isset() to check the definition. (see patch in attachment)

Thank you.

Attachments (1)

33172.patch (565 bytes) - added by CreativeJuiz 4 years ago.
Patch for class-wp-posts-list-table.php

Download all attachments as: .zip

Change History (5)

4 years ago

Patch for class-wp-posts-list-table.php

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

4 years ago

#2 @obenland
4 years ago

  • Version trunk deleted

#3 @iseulde
4 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

This ticket has not seen any activity in over *two* years, so I'm closing it as "wontfix".

The ticket may lack decisiveness, may have become irrelevant, or may not have gathered enough interest.

If you think this ticket does deserve some attention again, feel free to reopen.

For bugs, it would be great if you could provide updated steps to reproduce against the latest version of WordPress (5.0.2 at the time of writing). Remember images or a video can be superior to explain a problem. At the very least, quickly test again to make sure the bug still exists.

If it’s an enhancement or feature, some extra motivation may help.

Thank you for your contributions to WordPress! <3

#4 @JeffPaul
8 weeks ago

  • Keywords bulk-reopened added
  • Milestone set to Awaiting Review
  • Resolution wontfix deleted
  • Status changed from closed to reopened

A decision was made to reopen tickets that were closed in the bulk edit that this ticket was affected by. This ticket is being placed back into the Awaiting Review milestone so it can be individually evaluated and verified to determine if it is still relevant/valid or reproducible.

Note: See TracTickets for help on using tickets.