Opened 8 years ago

Closed 7 years ago

Last modified 6 years ago

#739 closed defect (bug) (wontfix)

View by days doesn't work

Reported by: Technosailor Owned by: westi
Priority: normal Milestone:
Component: General Version: 1.5
Severity: major Keywords: bg|has-patch
Cc: Technosailor, ciscocable

Description

When admin sets Options > Reading to view posts last x days, WP displays ALL posts (in my case back to May 19, 2004). Function works as expected when viewing x number of posts.

Attachments (2)

739.diff (2.8 KB) - added by westi 7 years ago.
First fix attempt
739.2.diff (912 bytes) - added by westi 7 years ago.
Alternate patch to better decribe this on Options > Reading

Download all attachments as: .zip

Change History (14)

  • Patch set to No

comment:2   matt8 years ago

  • Summary changed from Reproducible in 1.5b1 nightly build (approx Jan 10) to View by days doesn't work

comment:3   matt8 years ago

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

comment:4   ryan8 years ago

Curious, works for me. How many days did you set it for?

Set for 14 days

comment:6   Podz8 years ago

I know this is an old one ...

If I want to show the last 7 days worth of posts, and set "Show at most:" to 7 days, then what is shown is te last 7 days on which I posted.
This is not how I interpret "Show at most 7 days". I read that as "Show the last 7 days on a rolling basis". So if you come to my blog on 7 September, you will get shown what I posted from 1-7 inclusive and if there is nothing, you see nothing.
Right now, if I have that 7 days and I happen to have posted once a month, you would actually see 7 months worth of posts.

Could we have some way of fixing a rolling period by time, not posts ?

  • Milestone set to 2.1
  • Owner changed from ryan to westi
  • Status changed from assigned to new

Taking this one to see what I can do towards implementing proper "Show at most:" days code

westi7 years ago

First fix attempt

  • Keywords bg|has-patch bg|2nd-opinion bg|dev-feedback added
  • Status changed from new to assigned

Ok I've worked a patch on this which switches to querying on true days rather than post days.

This also saves us a couple of queries when in this mode per page view as we don't have to work out how to bound ourselves for the "post days"

Known issues:

  1. If you have no posts recent enough for the first page then it will return as if you queried for nothing
  2. The Paging code is bust as it currently only works out how many pages to do based on the number of posts in existance which doesn't match well with this query type - see _max_num_pages in template-function-links.php

comment:9   ryan7 years ago

We used to do it this way. It caused lots of complaints.

westi7 years ago

Alternate patch to better decribe this on Options > Reading

  • Keywords bg|2nd-opinion bg|dev-feedback removed

Ok Ryan, thats fine - I've knocked up and alternate patch which changes the "days" in the dropdown on options >> reading to "days with posts" which makes it explicit that this is how it works.

This should remove any confusion - I too expected it to show "days" rather than "days with posts"

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

[4457] Removed "view by days"

  • Milestone 2.1 deleted
Note: See TracTickets for help on using tickets.