Opened 15 years ago
Closed 14 years ago
#12448 closed defect (bug) (fixed)
pagination problem in unattached media page
Reported by: | Denis-de-Bernardy | Owned by: | matdumsa |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 2.9.2 |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
Description
when visiting media / unattached with multiple unattached media, you seem to end up with the wrong number of total pages, as highlighted in the attached screenshot.
Attachments (3)
Change History (10)
#1
@
14 years ago
- Keywords needs-patch added
- Milestone changed from 3.0 to 2.9.3
- Owner set to matdumsa
- Status changed from new to accepted
- Version changed from 3.0 to 2.9.2
#2
@
14 years ago
- Keywords has-patch added; needs-patch removed
Actually I found the problem..
It lies in wp-admin/upload.php
It seems that the pagination system used by the media is the same as the one used for POSTS.. It relies on information usually provided by the user in the $_GET variable (query string).
The code for everything BUT orphan is the same.. all it does is call wp_edit_attachments_query() which hack the $_GET array into thinking that these values (posts_per_page) where provided.. In our case these values were unset so this is why you see 0..
The attached patch makes the “hack” work even for unattached elements..
BTW this whole pagination code is pretty ugly.. Maybe a re-write would be require to avoid such bugs in the future..
Enjoy
I confirm the presence of the bug on my version of wordpress as well..