WordPress.org

Ready to get started?Download WordPress

Forums

post_date_gmt is always 0000-00-00 (9 posts)

  1. nicokaiser
    Member
    Posted 5 years ago #

    Since I upgraded my website to WordPress 2.5 the "post_date_gmt" field in the database is not set correctly when I create new posts. This does not happen every time, but I think it always happens when I save the draft first and then publish it later.

    Also, I sometimes cannot edit post times (editing the date works).

    Is there any additional information that I can provide to find a solution for this? This is really annoying, something seems to be fairly broken...

  2. jamesturnbull
    Member
    Posted 5 years ago #

    I've just discovered the same issue, which as you say seems to be related to a post being saved as a draft before publishing (perhaps on a different day?)

    I'm exploring further, and will come back with anything I find. In the meantime, this works to at least set the post_date_gmt to the post_date:

    update wp_posts set post_date_gmt = post_date WHERE post_date_gmt = '0000-00-00 0:00:00';

  3. nicokaiser
    Member
    Posted 5 years ago #

    Ok, great!
    I just did this query "by hand", as only a few posts were affected. There must be a broken (auto-?) save function that does not update the GMT date...

  4. jamesturnbull
    Member
    Posted 5 years ago #

    Are you using an object cache backend? I'm currently thinking that's where the issue is. If so, which one?

    This patch does fix the issue: http://trac.wordpress.org/ticket/6527 but I don't think it's the *right* fix.

  5. Kelson
    Member
    Posted 5 years ago #

    This problem started showing up when I turned on XCache about a week ago. There were about 5 or 6 posts that I noticed weren't showing up in my feed reader, and looking at the feed they were dated Dec 31 1969. (Oddly, the most recent one wasn't affected.) Checking out the DB showed them with zeroed-out gmt dates, which I manually fixed.

    I've applied the patch, and will keep an eye on the DB to see if that takes care of it.

    I did have a couple of other posts that weren't published, but for some reason showed post dates matching the modification date. This, interestingly, resulted in the dashboard telling me that I had one scheduled post, but producing an empty list when I tried to list them.

  6. rauru-block
    Member
    Posted 5 years ago #

    I had the same problem. I use XCache, too.
    I doubt WordPress 2.5.* has some bugs in object caching.

  7. nicokaiser
    Member
    Posted 5 years ago #

    I'm using object caching with XCache (the NeoSmart plugin). Should I turn it off next time I create a post? I guess I'll try this.

  8. jamesturnbull
    Member
    Posted 5 years ago #

    I've tried a few combinations and, for me at least, the post_date_gmt issue only occurs when I have the Neosmart xcache object cache backend installed.

    Using xcache in its default mode as a opcode cacher does not seem to be related to the issue.

    WordPress version: 2.5.1
    Xcache: 1.2.1
    Neosmart plugin: 0.6

    Has anyone seen if this issue occurs with other backends, such as the memcached, apc or eacellerator plugins?

  9. jamesturnbull
    Member
    Posted 5 years ago #

    To answer my own question: I just tried installing the memcached backend and cannot reproduce the problem.

Topic Closed

This topic has been closed to new replies.

About this Topic