#40975 closed defect (bug) (fixed)
'Empty Spam' and 'Empty Trash' comment buttons not displayed on mobile
Reported by: | SergeyBiryukov | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.8.1 | Priority: | normal |
Severity: | normal | Version: | 4.8 |
Component: | Comments | Keywords: | has-patch needs-testing |
Focuses: | administration | Cc: |
Description
Since [26134], top navigation for list tables is not displayed on mobile, which means that 'Empty Spam' and 'Empty Trash' buttons were only displayed in bottom navigation.
Since [40297], these buttons are not displayed in bottom navigation either (on both mobile and desktop) if there's only one page of comments in Spam/Trash, because $this->extra_items
is empty, $this->items
ends up empty too in ::display()
, so $this->has_items()
returns false.
The lack of the button also causes the %s items
string to overlap with the search bar, see the screenshot.
If there are two or more pages of comments in Spam/Trash, the buttons are displayed as expected.
Attachments (2)
Change History (8)
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
7 years ago
Note: See
TracTickets for help on using
tickets.
40975.patch fixes the issue by saving
$this->has_items()
to a static variable, so that the value is consistent between top and bottom navigation.Other screens appear to be unaffected, as they don't reset
$this->items
before displaying bottom navigation.