• Resolved Jason Ryan

    (@viablethought)


    Hello –

    After much testing with disabling ALL plugins, switching themes, et al. I have found that there is an odd issue with the Taxonomy view in the side metabox on Edit screens – all post types – when Gutenberg is disabled either using a plugin or through the theme we use.

    With Guteberg disabled, hierarchical Taxonomies with “child” terms show as the following:

    https://i.imgur.com/jgIfL5n.png

    When Gutenberg is enabled, the “child” terms are displayed properly as shown:

    https://i.imgur.com/tZxPvRa.png

    Why is the disabling of Gutenberg affecting the way these are displayed and wasn’t sure if it should be reported here or if I should submit a ticket to Core? Seems like this is a pretty big deal, especially for those who still use WordPress without Gutenberg.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Why is the disabling of Gutenberg affecting the way these are displayed and wasn’t sure if it should be reported here or if I should submit a ticket to Core?

    Hi @viablethought is this only happening on Custom Post Taxonomies you added to your site?

    Thread Starter Jason Ryan

    (@viablethought)

    @thelmachido

    Nope, it happens on the default Post and Product Categories too. Upon Page load, the hierarchy shows as it should, but then the issue happens after you select a Parent term and Child term and then save the Post or Product.

    Nope, it happens on the default Post and Product Categories too.

    I’m unable to reproduce this issue, the categories are displayed as they should both when Gutenberg is active and not active as shown in this short video.

    My site is using the TT3 theme and I only have the Gutenberg plugin. If you have checked the site by disabling all plugins besides Gutenberg and changing your theme to the default one, I would suggest checking the site on a different server.

    Thread Starter Jason Ryan

    (@viablethought)

    @thelmachido

    Seems that this is a WordPress issue not directly related to Gutenberg. I have solved my issue using the following filter which fixes the nested view of Child Terms when there are more than 50 listed taxonomy terms.

    // Fix for Taxonomy Treeview in Hierarchical Metaboxes
    if ( ! function_exists( 'changeTaxonomyCheckboxListOrder' ) ) {
      function changeTaxonomyCheckboxListOrder( $args, $post_id ) {
        if ( isset( $args['taxonomy'] ) ) {
          $args['checked_ontop'] = false;
        }
    
        return $args;
      }
      add_filter( 'wp_terms_checklist_args', 'changeTaxonomyCheckboxListOrder', 10, 2 );
    }

    Thanks

    Moderator Kathryn Presner

    (@zoonini)

    Hi @viablethought – thanks for sharing your solution, and the discovery that it’s not specifically tied to the block editor or Gutenberg plugin. Cheers!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Disabling Gutenberg Affects Hierarchical Taxonomies – Parent/Child Relationship’ is closed to new replies.