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

WordPress Trac noreply at wordpress.org
Sat Jul 27 06:13:16 UTC 2024


#61751: Custom post type editor working
---------------------------+-----------------------------------------
 Reporter:  karan4word     |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Editor         |     Version:  6.6.1
 Severity:  blocker        |  Resolution:
 Keywords:  needs-testing  |     Focuses:  javascript, administration
---------------------------+-----------------------------------------

Comment (by Mamaduka):

 The block editor makes assumptions about `icon` values based on the REST
 API schema, which states that they can be `string' or `null`.

 See https://github.com/WordPress/wordpress-
 develop/blob/c41304d73c32c968056abd2b1ffa19e83e9833a9/src/wp-includes
 /rest-api/endpoints/class-wp-rest-post-types-controller.php#L412-L417.

 @karan4word, it looks like you're setting the `menu_icon` property to
 false, which causes the error.


 I'll update the code to avoid errors when the `icon` doesn't match the
 schema type.

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


More information about the wp-trac mailing list