[wp-trac] [WordPress Trac] #62468: wp_update_post overwrites post_date when updating post_status
WordPress Trac
noreply at wordpress.org
Mon Sep 1 16:59:43 UTC 2025
#62468: wp_update_post overwrites post_date when updating post_status
-------------------------------------------------+-------------------------
Reporter: aguerra07 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future
| Release
Component: Posts, Post Types | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing has-unit- | Focuses:
tests |
-------------------------------------------------+-------------------------
Changes (by SirLouen):
* milestone: Awaiting Review => Future Release
Comment:
== Reproduction & Test Report
=== Description
This report validates whether the indicated patch works as expected.
Patch tested:
Fix: https://core.trac.wordpress.org/attachment/ticket/62468/fix-wp-
update-post.patch
Tests: https://github.com/WordPress/wordpress-develop/pull/8118.diff
=== Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.29
- Server: nginx/1.29.1
- Database: mysqli (Server: 8.4.6 / Client: mysqlnd 8.2.29)
- Browser: Chrome 140.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.3
- MU Plugins: None activated
- Plugins:
* Testing Dolly 1.0.0
* Test Reports 1.2.0
=== Testing Instructions
1. The ones provided in the OP
=== Actual Results
1. ✅ Issue resolved with patch.
=== Additional Notes
- @aguerra07 why would we be interested on preserving the date on
`publish` or `private`?
- I'm going to do a little revamp on the test and take the advantage that
its another `wp_update_post` test coverage, to merge all into a new file
made for this. I believe that this function is relevant enough to have its
own testing file.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62468#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list