Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #50754, comment 2


Ignore:
Timestamp:
07/30/2020 12:48:01 PM (5 years ago)
Author:
jadpm
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #50754, comment 2

    v1 v2  
    55Given 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.
    66
    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 who manifest in a number of other tickets related to wrong author being set, for example?
     7This 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?
    88
    99To 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.