[wp-trac] [WordPress Trac] #63325: Regression in saving posts with Block Editor in 6.8

WordPress Trac noreply at wordpress.org
Mon Apr 21 19:55:37 UTC 2025


#63325: Regression in saving posts with Block Editor in 6.8
--------------------------+-----------------------------
 Reporter:  margolisj     |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  6.8
 Severity:  normal        |   Keywords:
  Focuses:  rest-api      |
--------------------------+-----------------------------
 I believe this to be an issue on the save portion of the rest API. When
 saving the raw post data in the visual editor, we often have empty JS/JSON
 objects in our data; when this is saved, they are being transformed into
 arrays. I believe this is being done via the save post rest end point as
 checking the data after saving a post shows the post content having
 arrays. We have also noticed this before when saving post data when the
 user saving the post is not an admin. With WP 6.8 this also happening with
 users that have admin privilege.

 Example:
 {{{
 <!-- wp:nectar-blocks/button {"blockId":"block-
 RX3iloq4aK","bgColor":{"desktop":{"type":"solid","solidValue":"#2c80af","gradientValue":""},"tablet":{},"mobile":{},"hover":{}}}
 -->
 <div class="wp-block-nectar-blocks-button nectar-blocks-button nectar-
 font-label" id="block-RX3iloq4aK"><a href="#" class="nectar__link nectar-
 blocks-button__inner"><span class="nectar-blocks-
 button__text"></span></a></div>
 <!-- /wp:nectar-blocks/button -->
 }}}

 Which on save is being transformed into:
 {{{
 <!-- wp:nectar-blocks/button {"blockId":"block-
 RX3iloq4aK","bgColor":{"desktop":{"type":"solid","solidValue":"#af2c2c","gradientValue":""},"tablet":[],"mobile":[],"hover":[]}}
 -->
 <div class="wp-block-nectar-blocks-button nectar-blocks-button nectar-
 font-label" id="block-RX3iloq4aK"><a href="#" class="nectar__link nectar-
 blocks-button__inner"><span class="nectar-blocks-
 button__text"></span></a></div>
 <!-- /wp:nectar-blocks/button -->
 }}}

 If this is the expected behavior, is there a way to disable it, or
 otherwise filter out this functionality? This is fundamentally changing
 the data we send to the backend and then expect to be returned.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63325>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list