Ticket #2578 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

Setting "Show at most N posts" to 0 appears to break Page display (with a 404)

Reported by: gt4329b Assigned to: westi
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

2578.for.2.0.2.diff (461 bytes) - added by westi on 03/18/06 08:06:07.
Patch for 2.0.2 to fix this
2578.for.trunk.diff (455 bytes) - added by westi on 03/18/06 08:06:27.
Patch for trunk to fix this

Change History

03/17/06 22:21:07 changed by westi

  • keywords changed from Pages show at most 404 to Pages show at most 404 bg|needs-patch.
  • owner changed from anonymous to westi.
  • status changed from new to assigned.
  • milestone set to 2.1.

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

03/18/06 08:06:07 changed by westi

  • attachment 2578.for.2.0.2.diff added.

Patch for 2.0.2 to fix this

03/18/06 08:06:27 changed by westi

  • attachment 2578.for.trunk.diff added.

Patch for trunk to fix this

03/18/06 08:06:59 changed by westi

  • keywords changed from Pages show at most 404 bg|needs-patch to Pages show at most 404 bg|has-patch.

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.

03/18/06 10:55:37 changed by davidhouse

I don't think we should allow 0 for that setting...

03/18/06 10:56:04 changed by davidhouse

  • keywords changed from Pages show at most 404 bg|has-patch to Pages show at most 404 bg|has-patch bg|2nd-opinion.

03/18/06 10:59:14 changed by westi

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.

03/20/06 21:19:37 changed by ryan

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [3649]) Don't try to do paging for single page queries. Props westi. fixes #2578

04/22/06 07:55:55 changed by westi

  • status changed from closed to reopened.
  • resolution deleted.
  • milestone changed from 2.1 to 2.0.3.

Marking as candidate for 2.0.3 - This is already fixed in trunk and has-patch for 2.0.3

04/25/06 23:00:59 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [3752]) Don't try to do paging for single page queries. Props westi. fixes #2578

11/30/06 19:41:50 changed by

  • milestone deleted.

Milestone 2.0.3 deleted