[wp-trac] [WordPress Trac] #51872: Registering a custom taxonomy with `show_in_quick_edit` set to 'false' makes the whole Quick Edit UI to not show up

WordPress Trac noreply at wordpress.org
Wed Nov 25 08:20:31 UTC 2020


#51872: Registering a custom taxonomy with `show_in_quick_edit` set to 'false'
makes the whole Quick Edit UI to not show up
--------------------------------+-----------------------------
 Reporter:  _luigi              |      Owner:  (none)
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Quick/Bulk Edit     |    Version:  5.6
 Severity:  major               |   Keywords:  needs-patch
  Focuses:  ui, administration  |
--------------------------------+-----------------------------
 When a custom taxonomy, either public or private, is registered with
 `show_ui = true` and `show_in_quick_edit = false` as arguments, and the
 user, in the `edit.php` screen, clicks on a 'Quick edit' link for a
 (Custom) Post to which the custom taxonomy has been associated, the whole
 row that contains the 'Quick edit' link disappears and the following error
 pops up in the JavaScript console:

 {{{
 Uncaught TypeError: Cannot set property '_renderItem' of undefined
     at jQuery.fn.init.$.fn.wpTagsSuggest (tags-
 suggest.js?ver=5.6-RC1-49690:151)
     at HTMLDivElement.<anonymous> (inline-edit-
 post.js?ver=5.6-RC1-49690:342)
     at Function.each (jquery.js?ver=3.5.1:381)
     at jQuery.fn.init.each (jquery.js?ver=3.5.1:203)
     at Object.edit (inline-edit-post.js?ver=5.6-RC1-49690:326)
     at HTMLButtonElement.<anonymous> (inline-edit-
 post.js?ver=5.6-RC1-49690:128)
     at HTMLTableSectionElement.dispatch (jquery.js?ver=3.5.1:5429)
     at HTMLTableSectionElement.elemData.handle (jquery.js?ver=3.5.1:5233)
 }}}

 As a result the Quick Edit UI doesn't show up.

 The test code I have used to register the custom taxonomy is the
 following:

 {{{
 $arguments = array(
     'public'             => false,
     'show_ui'            => true,
     'show_admin_column'  => true,
     'show_in_quick_edit' => false
 );

 register_taxonomy( 'page_tag', 'page', $arguments );
 }}}

 The snippet of code has been executed from the `functions.php` file of the
 TwentyTwentyOne Theme with no plugin active. I have used WordPress
 5.6-RC1-49690 to run the test.

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


More information about the wp-trac mailing list