#2578 closed defect (bug) (fixed)
Setting "Show at most N posts" to 0 appears to break Page display (with a 404)
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | 2.0 |
| Severity: | major | Keywords: | Pages show at most 404 bg|has-patch bg|2nd-opinion |
| Cc: |
Description
To duplicate:
- go to "Options"->"Reading" and set the "Show at most # posts" value to "0"
- attempt to view any Page on the main site; the Page should fail with a "404"
- set the "Show at most # posts" setting back to a non-zero value; verify that the same Page now displays properly
As I understand it, the "Show at most" setting should only affect posts, not pages; regardless, it certainly shouldn't be causing 404 errors.
Attachments (2)
Change History (11)
- Keywords bg|needs-patch added
- Milestone set to 2.1
- Owner changed from anonymous to westi
- Status changed from new to assigned
- Keywords bg|has-patch added; bg|needs-patch removed
Ok Looking through the code the issue here is the post paging code in get_posts is used even when we are trying to get a Static Page.
The attached patches should fix this one against 2.0.2 and one against trunk.
comment:3
davidhouse — 7 years ago
I don't think we should allow 0 for that setting...
comment:4
davidhouse — 7 years ago
- Keywords bg|2nd-opinion added
Wether or not we allow 0 the patch still stands as we don't need to do Paging for static pages - we only expect one results from the query.
- Resolution set to fixed
- Status changed from assigned to closed
- Milestone changed from 2.1 to 2.0.3
- Resolution fixed deleted
- Status changed from closed to reopened
Marking as candidate for 2.0.3 - This is already fixed in trunk and has-patch for 2.0.3
- Resolution set to fixed
- Status changed from reopened to closed
Note: See
TracTickets for help on using
tickets.

I can confirm this really breaks things on 2.0.2
I get the "Not Found" search box on the front page (using the default theme)
I see 404's for the category archives and date archives
For Pages I just get the Edit This link
Similar behaviour on trunk except pages 404
I will look at writing a Patch against 2.0.2 and trunk that addresses this so that pages still work with this setup