Changes between Version 1 and Version 2 of Ticket #50754, comment 2
- Timestamp:
- 07/30/2020 12:48:01 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #50754, comment 2
v1 v2 5 5 Given the nature of the legacy metaboxes support, after REST saving a post with the (blocks) editor, an AJAX call is fired as to save metabox data, pretending to fire a POST request against the `edit.php` page, hence firing again an `wp_update_post`. Following the legacy editor logic, in that request we do not include post author data because there is no author selector, hence the current user ID is set. 6 6 7 This triggers some extra and probably interesting questions: why are we saving the entire post once form the REST API and then again when saving the legacy metabox data? May this introduce some other glitches wh o manifest ina number of other tickets related to wrong author being set, for example?7 This triggers some extra and probably interesting questions: why are we saving the entire post once form the REST API and then again when saving the legacy metabox data? May this introduce some other glitches which manifest as a number of other tickets related to wrong author being set, for example? 8 8 9 9 To the topic in this ticket, as I said above, a summary: preserving the current post author when saving a post with no declared support for this field is not enough if the post editor contains a legacy metabox.