Osclass icon indicating copy to clipboard operation
Osclass copied to clipboard

Media data table total/filtered_total opposite to Items data table

Open alastairR opened this issue 2 years ago • 2 comments

In ItemsDataTable, table function, total_filtered is set to the total number of unfiltered items, and total is set to the number of filtered items. The osc_pagination_showing and osc_show_pagination_admin functions are based on this usage.

However, in MediaDataTable, table function, total_filtered is set to the number of filtered items, and total is set to the number of unfiltered items, causing the osc_pagination functions to show incorrectly.

To reproduce:

  • click view media for any item in the admin 'manage items' list where the item has images.
  • the 'manage media' page only shows the images for the selected item, but the pagination is shown as if all media displayed, and clicking any page number result in the system hanging, trying to show a page for which there are no filtered media

alastairR avatar Dec 02 '21 22:12 alastairR

Okay, I'll push some changes this week to resolve this.

navjottomer avatar Dec 04 '21 10:12 navjottomer

Made a few changes.

navjottomer avatar Dec 09 '21 06:12 navjottomer