Opened 8 years ago
Last modified 5 years ago
#38507 new defect (bug)
Quick Edit: Parent label without input when editing page
Reported by: | swissspidy | Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | has-patch has-screenshots needs-refresh |
Focuses: | Cc: |
Description
Noticed while working on #18375.
To reproduce:
- Delete all pages
- Create a new page, save as Draft
- Click Quick Edit or Bulk Edit
- 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:
Attachments (2)
Change History (5)
#1
@
8 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.
#2
@
8 years ago
- Keywords has-screenshots added
- Milestone changed from Awaiting Review to 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:
Note: See
TracTickets for help on using
tickets.
Updated code to check if the dropdown is empty before outputting the variable and dropdown.