[wp-trac] [WordPress Trac] #64017: WordPress REST API returns 500 error when updating serialized meta with an unchanged value

WordPress Trac noreply at wordpress.org
Mon Sep 22 21:42:23 UTC 2025


#64017: WordPress REST API returns 500 error when updating serialized meta with an
unchanged value
-------------------------------+------------------------------
 Reporter:  wwccscorer         |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  REST API           |     Version:  6.8.2
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by westonruter):

 So the error is happening when saving `event_date`, `event_start_time`, or
 `course_name_slug` meta keys? The values you're storing here don't seem to
 be anything but strings. They don't seem to need to be serialized to be
 stored in meta.

 Without that `update_post_metadata` filter added, can you reproduce the
 500 error and share the REST API payload and response? For example, in
 Chrome DevTools, in my example plugin I selected the `POST` request to
 update the `posts` endpoint, and the payload for me is:

 {{{
 {
   "meta": {
     "color_names_array": [
       "red",
       "green",
       "blue"
     ]
   }
 }
 }}}

 And the response is JSON containing the entire post entity, including the
 meta I provided.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64017#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list