Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#10401 closed defect (bug) (invalid)

Importing future posts through WXR doesn't schedule posts

Reported by: joostdevalk's profile joostdevalk Owned by: markjaquith's profile markjaquith
Milestone: Priority: normal
Severity: normal Version:
Component: Import Keywords: has-patch needs-testing
Focuses: Cc:

Description

When importing a future post, the importer should immediately schedule the publish event.

Attachments (1)

import-wordpress.php.patch (605 bytes) - added by joostdevalk 16 years ago.
Patch

Download all attachments as: .zip

Change History (8)

#1 @joostdevalk
16 years ago

  • Keywords has-patch needs-testing added
  • Owner set to joostdevalk
  • Status changed from new to accepted

#2 @markjaquith
16 years ago

  • Owner changed from joostdevalk to markjaquith

You have to pass a UNIX timestamp in to wp_schedule_single_event(). Wouldn't that be a MySQL DateTime in $post_date ?

#3 @joostdevalk
16 years ago

Hmm should have checked that, doesn't that mean adding a single strtotime around the date?

#4 @markjaquith
16 years ago

Check out how it's done in other places. Also, keep aware that it should be GMT, so use the GMT datetime and append ' GMT'

#5 @joostdevalk
16 years ago

Fixed, thanks for the remarks Mark!

#6 @joostdevalk
16 years ago

  • Resolution set to invalid
  • Status changed from accepted to closed

Should have checked better, while testing the import on an unpatched version, I noticed it works already, so the server I encountered the issue on had other problems. _transition_post_status actually DOES schedule the post on insertion.

#7 @Denis-de-Bernardy
15 years ago

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