WordPress.org

Support

Support » Plugins and Hacks » Edit Flow » [Resolved] EditFlow and post_date_gmt

[Resolved] EditFlow and post_date_gmt

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Daniel Bachhuber

    @danielbachhuber

    Hand Built

    Odd. It does sounds like it could be Edit Flow-related, and my primary suspect are these two filters.

    Have you been able to track down steps to reproduce reliably? Any special details about your server environment, or other plugins you might be running?

    Thanks for your reply. We have multiple authors and several have reported that when they create a new post, and come back to it later to edit, clicking the “Schedule” button causes it to publish immediately rather than schedule the time to publish. We do make use of custom statuses so often the post is left in one of those states. When this happened last I looked at the database and noticed that for that particular post the post_date_gmt was actually 5 days earlier than post_date, which I thought was very odd.

    Our site is hosted by WP Engine, a managed WordPress hosting service. I do think it has to do with EditFlow, since it doesn’t happen with any of our other sites.

    Do you have a suggestion as to how we implement those filters?

    thanks!

    Plugin Author Daniel Bachhuber

    @danielbachhuber

    Hand Built

    When this happened last I looked at the database and noticed that for that particular post the post_date_gmt was actually 5 days earlier than post_date, which I thought was very odd.

    Could this have been when the post was originally created? It sounds awfully similar to this issue, which I suspect is due to replication lag or something similar.

    Hi. I have the exact same problem, but I’ve noticed it only happens if I move the post in the calendar. I mean, if I change the publishing date dragging & dropping the post on a different day then the original, the date doesn’t actually change even if in the editing window the new date shows up and in the calendar the post appears in the new day.

    I think you’re onto something mad283. Our authors tend to use the calendar to drag and drop posts too. I just tried this with a test post created today – dragged it to 3 days in the future then in the editing screen clicked Schedule, and sure enough, it published! It’s like the post date is getting “stuck” on the date/time you create it when using the calendar to schedule.

    Hi Daniel – did you find a workaround for this issue?

    I can also confirm some issues with scheduling posts on the calendar. Looking into it now.

    If anyone can confirm the following steps to reproduce, that’d be most awesome.

    Steps to reproduce:
    1) Create a new post. Save it as is (do not publish or schedule).
    2) Go to the calendar and move the post a day or more forward
    3) Go back to the post. The publish button should say “Publish,” but if you click on the “edit” link next to “Publish immediately” you should see the correctly scheduled date displayed.
    4) Hit “ok” and the publish button should now say “Schedule”

    @cojennin: I can confirm your steps exactly. The problem lies in that when you click Schedule it then publishes right away. Does that happen for you?

    Yes, that’s exactly what happens. But only if you I also drag & drop the post in the calendar.

    One more thing: if, after having draggeg and dropped a post in the calendar, I change the pubblishing date in the editing window, that sticks and the post doesn’t get pubblished immediately.

    Yes, you’re right mad283. Curious thing is on steps 3 and 4 above, the correct date is shown, but if you click OK (without changing the date) it still says “Publish immediately” instead of the date. It seems that dragging the post to a new date in the calendar should actually cause it display the date instead of “Publish immediately”, so therein lies the bug.

    Found the solution here: http://editflow.org/features/calendar/

    ef_calendar_allow_ajax_to_set_timestamp (filter) РWhether or not dragging an unpublished post to a new date changes the publication timestamp for the post. This is off by default. You can enable it by placing the following in your theme’s functions.php file:

    add_filter( ‘ef_calendar_allow_ajax_to_set_timestamp’, ‘__return_true’ );

    Plugin Author Daniel Bachhuber

    @danielbachhuber

    Hand Built

    @berkeleypa I think that’s a partial fix. If you add the filter, it will change the behavior of the calendar to set the publication timestamp for the post if you drag the post. This will at least make it more obvious the timestamp isn’t what it should be.

    The default behavior is broken I think. The way it’s supposed to work is that you can drag the posts on the calendar, but it shouldn’t affect the publication date of the post (which it seems to be doing).

    @daniel yes but this is the behavior that we are expecting, that when you drag a post from one date to another, the date of publication should change accordingly. Otherwise how does the new date come into play? It does seem to be saved somewhere in the database, but both post_date and post_date_gmt were sticking to the original date on which the post was created, which was causing the premature publishing problem.
    Hope that’s clear. Thanks for your help!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Resolved] EditFlow and post_date_gmt’ is closed to new replies.
Skip to toolbar