WordPress.org

Forums

[resolved] 2.0 Time Stamps of Draft Posts (10 posts)

  1. GaryPetersen
    Member
    Posted 9 years ago #

    I thought someone had mentioned this here, but I couldn't find the post by searching.

    Since upgrading to v2.0, the timestamp of a post saved as a draft is not getting automatically updated when the post is published. This is different than the behavior on v1.5.2.

    I couldn't find a setup option for this, so I'm presuming it is in the underlying code. Does any one have suggestions on how to change this back? I can manually edit the posts, but would prefer to not have to.

    Thanks in advance.

    Gary Petersen
    garypetersen at gmail.com

  2. JordonK
    Member
    Posted 9 years ago #

    This is bothering me as well. I'd like to know if there's a fix for it, because I don't want to have to enter the timestamp manually.

  3. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    The timestamp is not set to the current time upon publishing? The time should be set to current the first time you publish a post. If you publish a post, move it back to draft, and publish again the timestamp will not update, however.

  4. JordonK
    Member
    Posted 9 years ago #

    I haven't actually checked if the timestamp is set to the current time upon publishing, but it doesn't update itself when I save a draft, even if I check "Edit timestamp."

  5. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    That's by design. We had to do that to fix some other issues. The time is not set on a post until it is published. See this bug for discussion.

  6. JordonK
    Member
    Posted 9 years ago #

    Oh, that's fine then. Thanks for the reply.

  7. GaryPetersen
    Member
    Posted 9 years ago #

    I am still having the issue, but only with posts that were created and saved as drafts in v1.5.2 and are being published in v2.0. Posts created in v2.0 are updating okay.

    So the issue will go away for me in another week or two, when I run out of posts created before.

  8. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    Hmmm, I think you hit a little backward incompatibility gotcha. The new code assumes that drafts are saved without timestamps. It has no way of knowing that the old 1.5 draft that has a timestamp isn't a 2.0 draft moved from publish back to draft. That's why it doesn't try to update the timestamp upon publish. I think you'll have to create new drafts and cut-and-paste content into them from the old ones if you want updated timestamps. Annoying, I know. I'll see if we can fix this up for the future. I'm not too thrilled with how the timestamp lifecycle is working out.

  9. GaryPetersen
    Member
    Posted 9 years ago #

    Thanks for the follow-up, Ryan. I'm sure you and the rest of the WordPress community have been really busy this last week with upgrade issues. I know the forums have been hopping. I appreciate WordPress and the effort you and the rest of the team put into it.

  10. kvillines
    Member
    Posted 9 years ago #

    Well I am still having a problem....The functionality is different when saving a draft post. In WP 1.5.2 and earlier when a draft was edited the "Edit Timestamp" was automatically checked. This no longer happens and causes posts to be insterted with a year of 1969. The edit timestamp checkbox is also hidden because of the new AJAX Gui. I am pretty sure this is what everyones problem is.

    Steps to reproduce:

    1) Write a new post and only hit save
    2) Go back in and edit the draft
    3) only hit publish...basically rely on the edit timestamp being automatically set (like before WP2)
    4) checkout the timestamp that is actually inserted.

    The solution is to put back the functionality that editing a draft had before WP 2. When you selected a draft to edit the checkbox was auto selected. The workflow has been changed and cause problems. Then users think it is a bug with how it publishes and it isn't.

Topic Closed

This topic has been closed to new replies.

About this Topic