Make WordPress Core

Opened 10 years ago

Last modified 15 months ago

#38507 new defect (bug)

Quick Edit: Parent label without input when editing page

Reported by: swissspidy Owned by:
Priority: normal Milestone: Future Release
Component: Quick/Bulk Edit Version:
Severity: normal Keywords: has-patch has-screenshots
Cc: Focuses:

Description

Noticed while working on #18375.

To reproduce:

  1. Delete all pages
  2. Create a new page, save as Draft
  3. Click Quick Edit or Bulk Edit
  4. Notice a 'Parent' label without any dropdown

It might make sense to always use 'show_option_none' in wp_dropdown_pages(), even when there are no pages. However, that might lead to data loss when a parent ID is set but the page does not exist anymore. Instead, the 'Parent' label could be hidden.

Screenshot:

https://cldup.com/tUquX3xYvS.png

Attachments (2)

38507.diff​ (2.4 KB ) - added by Fencer04 10 years ago.
Updated code to check if the dropdown is empty before outputting the variable and dropdown.
38507.2.diff​ (2.3 KB ) - added by swissspidy 10 years ago.

Download all attachments as: .zip

Change History (7)

@Fencer04
10 years ago

Updated code to check if the dropdown is empty before outputting the variable and dropdown.

#1 @Fencer04
10 years ago

  • Keywords has-patch added; needs-patch has-screenshots removed

I added a patch that first sends the output of wp_dropdown_pages() into a variable and check to see if it is empty before outputting the label and dropdown.

@swissspidy
10 years ago

#2 @swissspidy
10 years ago

  • Keywords has-screenshots added
  • Milestone Awaiting Review → Future Release

38507.2.diff​ is a refreshed patch from the root directory (src) so that it applies cleanly, e.g. when using grunt patch.

Screenshot:

https://cldup.com/fasDtBglFB.png

#3 @desrosj
8 years ago

  • Keywords needs-refresh added

Patch needs to be refreshed to apply cleanly.

#4 @sabernhardt
15 months ago

  • Component Posts, Post Types → Quick/Bulk Edit

This ticket was mentioned in ​PR #9205 on ​WordPress/wordpress-develop by ​@sukhendu2002.


15 months ago
#5

  • Keywords needs-refresh removed
Note: See TracTickets for help on using tickets.