• snoffel

    (@snoffel)


    When I publish an article-draft with a given Publish-Date/Time in article Editing Mode, the Date/Time stays what I gave him before.
    When I use Quick Edit (or Bulk Actions > Edit) to publish the article(s), the Publish-Date/Time gets resetted to NOW – the given Date/Time and therefor article-order is lost.

    I would expect Quick Edit to work the same way as publishing it one by one – and I think it did so before WordPress 6.3

    My use-case: I do publish several articles at the same time, bundled in an magazine-issue. I write and collect these articles over weeks and finally order them with a given publishing date and time, newest on top:
    For example: Topstory: yesterday 8:00, second story: yesterday 7:00, third: yesterday 6:00 etc.

    I would like to publish them all at once via Bulk Actions > Edit without loosing the order.

    Is this a bug or am I missing something?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Even though it’s not the behavior you want, it makes sense to me that if you bulk publish draft posts, they reflect the NOW date/time since this is when they were actually published.

    Whether it makes sense or not, it is what it is and it’s not what you want, so what to do? The publish date can be forced to be something else through the “wp_insert_post_data” filter. Instead of using what WP thinks should be assigned, the currently saved date could be retrieved and used to replace the NOW date/time that WP was trying to use.

    I’m not aware of any plugin that’ll do this for you. It may need to be custom coded, but it’s worth doing a plugin search before doing any custom work. No one can know about every plugin that’s available.

    Thread Starter snoffel

    (@snoffel)

    Thanks for your reply!

    Meanwhile I digged a bit into it:

    1. I checked that through: Up to WordPress 6.2.3 the behaviour was just like I described it. So there was a change to the Quick Edit function.
    2. I found there was an acknowledged bug in QuickEdit concerning the input of a publisihing date not getting saved and forced to NOW. https://core.trac.www.ads-software.com/ticket/59125 – this got fixed in 6.4.

    As this bug sounds soo related and as it is an undocumented change in behaviour – i was pretty sure I found a bug. Until … I read your answer. Now I am confused.

    Leaving Bulk-Editing aside:

    • Publishing a post in Edit-mode -> inserted Date stays,
    • Publishing a single post in QuickEdit -> insertedDate gets forced to NOW

    That doesn’t sound right to me.

    Moderator bcworkz

    (@bcworkz)

    It’s debatable which way is “correct”. We don’t agree on that, that’s fine. What is certainly an issue is inconsistent behavior. Whichever way is correct, it should be consistent.

    The Trac ticket refers to users explicitly altering the date field and not being able to. The patch corrected that. It doesn’t address date behavior when status is changed.

    If you cannot find a ticket related to date change when status is changed, feel free to open a new ticket. While waiting for action to be taken, you can patch your installation’s behavior through “wp_insert_post_data” filter like I mentioned earlier.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Quick Edit > Publishing forces Post-Date to NOW’ is closed to new replies.