Ticket #739 (closed defect (bug): wontfix)

Opened 7 years ago

Last modified 5 years ago

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

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

Change History

  • Patch set to No

comment:2   matt7 years ago

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

comment:3   matt7 years ago

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

comment:4   ryan7 years ago

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

Set for 14 days

comment:6   Podz6 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 ?

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

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

westi6 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   ryan6 years ago

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

westi6 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"

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

[4457] Removed "view by days"

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