[wp-trac] [WordPress Trac] #48401: Saving a Post Breaks in Gutenberg if you have a custom taxonomy named Status

WordPress Trac noreply at wordpress.org
Fri Dec 20 04:34:38 UTC 2019


#48401: Saving a Post Breaks in Gutenberg if you have a custom taxonomy named
Status
-------------------------------------------------+-------------------------
 Reporter:  kingkool68                           |       Owner:  fgiannar
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.4
Component:  REST API                             |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  good-first-bug needs-refresh has-    |     Focuses:
  unit-tests                                     |
-------------------------------------------------+-------------------------

Comment (by fgiannar):

 @TimothyBlynJacobs I have added a new patch with the discussed updates.
 While testing this I also noticed that it is possible to register two
 different taxonomies with the same rest_base.
 eg
 {{{
 register_taxonomy( 'tax_1', array( 'post' ), array( 'show_in_rest' =>
 true, 'rest_base' => 'common' ) );
 register_taxonomy( 'tax_2', array( 'post' ), array( 'show_in_rest' =>
 true, 'rest_base' => 'common' ) );
 }}}

 This also causes the warning to be displayed, but this time because the
 common custom taxonomy `rest_base` of `tax_2` conflicts with the already
 registered property of the `tax_1` taxonomy `rest_base`.
 I think it's alright to also show the warning in this case.
 Do you believe it would also make sense to open another ticket for
 preventing registering two taxonomies with the same custom `rest_base` or
 the current one should be considered enough?

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


More information about the wp-trac mailing list