WordPress.org

Make WordPress Core

Opened 11 months ago

Closed 6 months ago

#39509 closed defect (bug) (fixed)

WP_Screen does not set post type on wp-admin/upload.php

Reported by: postpostmodern Owned by: joemcgill
Milestone: 4.8 Priority: normal
Severity: normal Version: 4.7
Component: Media Keywords: has-patch has-unit-tests commit
Focuses: administration Cc:

Description

One place this manifests is in the restrict_manage_posts action in class-wp-media-list-table.php - which passes an empty string as $this->screen->post_type as it's argument.

Attachments (1)

wp_screen_attachment.diff (1.6 KB) - added by postpostmodern 11 months ago.
fix in class WP_Screen and includesScreen unit test

Download all attachments as: .zip

Change History (9)

@postpostmodern
11 months ago

fix in class WP_Screen and includesScreen unit test

#1 @johnbillion
9 months ago

  • Focuses administration added
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.8

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


8 months ago

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


6 months ago

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


6 months ago

#5 @joemcgill
6 months ago

  • Keywords has-unit-tests added
  • Owner set to joemcgill
  • Status changed from new to assigned

#6 @joemcgill
6 months ago

  • Keywords commit added

I've tested and this looks good to me. Marking for commit.

#8 @joemcgill
6 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 40800:

Media: Ensure WP_Screen sets post type on wp-admin/upload.php.

The post type property is set to 'attachment' when on the upload screen.

Props postpostmodern.
Fixes #39509.

Note: See TracTickets for help on using tickets.