Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#40003 closed defect (bug) (fixed)

Error in pagination classes

Reported by: sgr33n's profile SGr33n Owned by: afercia's profile afercia
Milestone: 4.9 Priority: normal
Severity: normal Version: 3.4
Component: Administration Keywords: has-patch has-screenshots
Focuses: Cc:


Looking at the code I found a little error on wp-admin/includes/class-wp-list-table.php. The $pagination_links_class variable should add a hide-if-js at line 848, but instead of adding the class at the existing variable it clears the previus class.

Attachments (1)

40003.diff (495 bytes) - added by SGr33n 7 years ago.

Download all attachments as: .zip

Change History (7)

7 years ago

#1 @SGr33n
7 years ago

  • Keywords has-patch added

#2 @1naveengiri
7 years ago

  • Keywords close 2nd-opinion added; has-patch removed

@SGr33n This is perfect.
No need to let that class there, if that is not in use.

#3 @SergeyBiryukov
7 years ago

  • Component changed from Posts, Post Types to Administration
  • Version changed from trunk to 3.4

Introduced in [20094].

#4 @SergeyBiryukov
7 years ago

  • Keywords has-patch added; close 2nd-opinion removed

#5 @afercia
7 years ago

  • Keywords has-screenshots added
  • Milestone changed from Awaiting Review to 4.9
  • Owner set to afercia
  • Status changed from new to assigned

The original intent to add the CSS class is pretty clear (because there is a space before the class). So I'd say either the space should be removed or the two strings be concatenated. I'm not sure this code is actually used anywhere in core. The infinite_scroll pagination arg is true just for the themes and theme-install list tables, and they're not used any longer (unless I'm missing something). However, custom tables added by plugins might use infinite scroll.

The pagination-links CSS class shouldn't be removed in any case, because it is used for some styling in the responsive view.

The theme install screen in WordPress 3.8, before the JS refactoring introduced in 3.9:

With JS off:

#6 @afercia
7 years ago

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

In 41019:

Administration: in WP_List_Table->pagination(), properly concatenate CSS classes for the pagination links when infinite_scroll is set to true.

Props SGr33n.
See #19815.
Fixes #40003.

Note: See TracTickets for help on using tickets.