Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#2693 closed defect (bug) (fixed)

Paging broken on Manage Posts

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

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 17 years ago.
2693.2.diff (502 bytes) - added by westi 17 years ago.
Alternative patch - use the query info

Download all attachments as: .zip

Change History (9)

#1 @matt
17 years ago

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

#2 @ryanscheuermann
17 years ago

  • Summary changed from Paging broken on Manage Pages to Paging 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
17 years ago

#3 @Nazgul
17 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
17 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
17 years ago

Alternative patch - use the query info

#5 @westi
17 years ago

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

#6 @westi
17 years ago

  • Owner changed from anonymous to westi
  • Status changed from new to assigned

#7 @markjaquith
17 years ago

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

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

Note: See TracTickets for help on using tickets.