Make WordPress Core

Opened 20 years ago

Closed 20 years ago

#2693 closed defect (bug) (fixed)

Paging broken on Manage Posts

Reported by: ryanscheuermann Owned by: westi
Priority: normal Milestone: 2.1
Component: Administration Version: 2.1
Severity: normal Keywords: paging has-patch
Cc: Focuses:

Description

I posted this in wp-testers but it seems no one reads that list anymore...

Using latest trunk code, BTW.

First off, the paging on the Manage Posts admin page is determined by the option "posts_per_page" but the results list is hardcoded to show the Latest 15 posts:

edit.php, line 59:

   wp('what_to_show=posts&posts_per_page=15&posts_per_archive_page=-1');

So, if I set the "posts_per_page" option to 5 (on Options->Reading) and I have 15 posts, the Manage Posts page allows me to page through 3 pages:

  • the first page contains my latest 15 posts
  • the second page (previous) is blank
  • the third page (previous) is blank

The other bug is related to Ticket #2578

If I set "show at most N posts" to 0, the Manage->Posts page now displays 15 posts and this error:

*    Warning*:  Division by zero in *wp-includes\template-functions-links.php* on line *476*

This is also related to Changeset 3694.

Attachments (2)

2693.diff (690 bytes ) - added by Nazgul 20 years ago.
2693.2.diff (502 bytes ) - added by westi 20 years ago.
Alternative patch - use the query info

Download all attachments as: .zip

Change History (9)

#1 @matt
20 years ago

Is this latest trunk? I'm pretty sure I removed paging on the Page page page.

#2 @ryanscheuermann
20 years ago

  • Summary Paging broken on Manage PagesPaging broken on Manage Posts

OMG, my bad, I meant that to be the Manage Posts page is broken! Yeah, you're right, paging on Manage Pages is removed, but paging on Manage Posts is broken. :-) Typo!

@Nazgul
20 years ago

#3 @Nazgul
20 years ago

  • Keywords has-patch added

I've attached a patch which fixes paging.

The other issue mentioned seems to have been fixed already.

#4 @westi
20 years ago

-1 to this patch

I think we still want to show 15 posts.

And you can't treat the translation like that you need to use sprintf or it won't be translateable.

Can we not make this paging work correctly?

@westi
20 years ago

Alternative patch - use the query info

#5 @westi
20 years ago

Alternative patch fixes the issue as keeps the paging going on.

#6 @westi
20 years ago

  • Owner changed from anonymous to westi
  • Status newassigned

#7 @markjaquith
20 years ago

  • Resolutionfixed
  • Status assignedclosed

(In [4316]) Manage Posts paging fix from Westi. fixes #2693

Note: See TracTickets for help on using tickets.