Log in with username/password: lyceum/lyceum

Ticket #740 (new defect)

Opened 2 years ago

Last modified 11 months ago

future posts are being counted in the category counts

Reported by: lyceum Assigned to:
Priority: normal Milestone: Problem with WordPress
Keywords: Cc: ageller, bthale

Description

Future posts are showing up in category counts as shown on the homepage of a blog.

I noticed this because I have a future post in a new category. The new category is appearing with a (1).

When clicked, the 404 page pops up.

Attachments

category_part3.diff (7.0 kB) - added by bthale on 04/12/07 09:38:41.
Patch to fix category counts to handle future dated posts

Change History

03/02/07 01:58:05 changed by jjb

  • milestone set to 1.0.

03/05/07 23:01:12 changed by jjb

Adam-

Could you check if this problem persists on the demo site? Thanks.

03/06/07 00:20:23 changed by ageller

yes. error still exists

04/12/07 09:36:43 changed by bthale

  • cc changed from ageller to ageller, bthale.
  • priority changed from normal to high.

Tip of the iceberg. Turns out the whole message counting system was unreliable, particularly in the presence of future-dated posts. The attached patch removes reliance on the categories.category_count field and instead calculates the current message count dynamically when the category record is read.

This allows the counts to automatically adjust when time catches up to future-dated posts. The cache may still be problematic. Although the count is determined when a category record is added/updated in the cache, the count is not refreshed when a record is retrieved from the cache so the counts may be out of date for cached category records. Of course, that is always a vulnerability when using a cache so it might not be a big deal.

04/12/07 09:38:41 changed by bthale

  • attachment category_part3.diff added.

Patch to fix category counts to handle future dated posts

06/11/07 03:09:54 changed by ageller

error still exists in demo

08/07/07 00:41:09 changed by ageller

jjb, check to see if you can steal some of the logic from the new teachfor.us front page

08/11/07 12:30:31 changed by jjb

  • priority changed from high to normal.
  • milestone changed from 1.0.11.0 to The Future.

This problem exists in wordpress 2.0.11

After synching with 2.2.x, we'll check back in and see if it persists

08/18/07 22:15:42 changed by jjb

(and I did check and 2.2.x does NOT have the problem. Not sure why I didn't mention that before)

10/23/07 02:14:28 changed by jjb

  • milestone changed from The Future to Problem with WordPress.
Log in with username/password: lyceum/lyceum