WordPress.org

Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#2961 closed defect (bug) (fixed)

get_calendar() bug with futurepost

Reported by: murky Owned by: markjaquith
Milestone: Priority: normal
Severity: normal Version: 2.0.3
Component: Administration Keywords: has-patch 2nd-opinion
Focuses: Cc:
PR Number:

Description

I've searched and haven't seen this reported, apologies if this is a duplicate.

With the <?php get_calendar(); ?> function, there is a bug with futureposts which have the status of 'publish'.

If the futurepost is in a future month, a navigation link for that month is displayed. Of course, this yields a 404.

E.g. On http://www.murky.org/blg I have a post scheduled for Feb 2007 (a long way off, I know), and a link for Feb 2007 is present.

Attachments (1)

calendar_future_posts_001.diff (1.2 KB) - added by markjaquith 14 years ago.
Patch for /branches/2.0/

Download all attachments as: .zip

Change History (7)

@markjaquith
14 years ago

Patch for /branches/2.0/

#1 @markjaquith
14 years ago

  • Keywords has-patch 2nd-opinion added
  • Milestone set to 2.0.4
  • Owner changed from anonymous to markjaquith
  • Status changed from new to assigned
  • Version set to 2.0.3

Try this patch. We just need to check post_date to make sure it isn't in the future. Not an issue with 2.1, so this only needs to go into the 2.0 branch.

#2 @murky
14 years ago

Thanks for that... now... how do I go about applying the patch?

(Please assume that I'm simply unfamiliar with wordpress and applying diffs - but am able to follow reasonable instructions)

#3 @ryan
14 years ago

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

(In [4025]) Don't let get_calendar travel into the future. Props Mark Jaquith. fixes #2961

#4 @ryan
14 years ago

source:branches/2.0/wp-includes/template-functions-general.php#4025

murky, download that version of template-functions-general.php and copy it over your existing version of that file.

#5 @murky
14 years ago

Thank you very much indeed.

#6 @(none)
13 years ago

  • Milestone 2.0.4 deleted

Milestone 2.0.4 deleted

Note: See TracTickets for help on using tickets.