[wp-trac] [WordPress Trac] #61751: Custom post type editor working

WordPress Trac noreply at wordpress.org
Mon Jul 29 16:56:27 UTC 2024


#61751: Custom post type editor working
-------------------------+-------------------------------------------------
 Reporter:  karan4word   |       Owner:  (none)
     Type:  defect       |      Status:  new
  (bug)                  |
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Editor       |     Version:  6.6.1
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  javascript, administration, rest-
                         |  api
-------------------------+-------------------------------------------------
Changes (by TimothyBlynJacobs):

 * focuses:  javascript, administration => javascript, administration, rest-
     api
 * severity:  blocker => normal


Comment:

 > Here's my proposed fix -
 https://github.com/WordPress/gutenberg/pull/64015.

 It seems reasonable to me that GB expect that the REST API returns values
 of the type it documents. I imagine there are other parts of GB that would
 break if the REST API started returning data in unexpected shapes. So
 personally I'm not 100% sure on the need to change GB but :shrug:

 > Should we also harden the checks in REST API to ensure they always
 return the types specified in the schema?

 I think we should probably fix this in `register_post_type` to coerce the
 value to `string|null` since it doesn't document `false` as a possible
 property value for `menu_icon`.

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


More information about the wp-trac mailing list