Taxonomy Terms with Multiple Parents not rendering properly

Created on 29 September 2022, over 2 years ago
Updated 13 May 2025, 19 days ago

Problem/Motivation

In a taxonomy whose terms may have multiple parents, it does not render properly.

What I expect (note multiparent items like "Planning and Design" appear in more than one location)

▼Colleges
          ▼Agriculture and Natural Resources
                    Agriculture, Forestry, Horticulture, and Plant Sciences
                    Animal Sciences and Veterinary Medicine
                    Biological Sciences
                    Environmental Sciences
                    Fisheries and Wildlife
                    Food Science and Human Nutrition
                    Geosciences
                    Planning and Design
          ▼Arts and Letters
                    Art, Art History, Design, Museum Studies
                    Gender Studies
                    Linguistics and Language Learning
                    Philosophy
                    Religious Studies and Medieval & Renaissance Studies
          ▼Business
                    Business Education
                    Economics
          ▼Communication Arts and Sciences
                    Advertising & Public Relations
                    Communication
                    Journalism
          ▼Education
                    Kinesiology and Physical Education
                    Mathematics and Math Education
                    Teacher Education
          ▼Engineering
                    Engineering Practice and Education
          ▼Human Medicine
                    Medicine
                    Nursing
                    Public Health
          ▼Law
                    Practice and Teaching of Law
          ▼Music
                    Music and Music Education
          ▼Natural Sciences
                     Agriculture, Forestry, Horticulture, and Plant Sciences
                    Biological Sciences
                    Chemistry
                    Environmental Sciences
                    Geosciences
                    Mathematics and Math Education
                    Physics and Astronomy
                    Planning and Design
          ▼Social Sciences
                    Anthropology
                    Criminal Justice
                    Economics
                    Geosciences
                    Planning and Design
                    Political Science
                    Psychology
                    Social Work
                    Sociology
                    U. S. History
          ▼Veterinary Medicine
                    Animal Sciences and Veterinary Medicine
▼Topics
          Accessibility
          General Resources
          Humanities
          Sciences

What I get (with parents listed as 1 record per value - note multiparent items under the first matching parent)

▼Topics
          Accessibility
          General Resources
          Humanities
          Sciences
▼Colleges
          ▼Communication Arts and Sciences
                    Advertising & Public Relations
                    Communication
                    Journalism
          ▼Agriculture and Natural Resources
                    Agriculture, Forestry, Horticulture, and Plant Sciences
                    Agriculture, Forestry, Horticulture, and Plant Sciences
                    Animal Sciences and Veterinary Medicine
                    Animal Sciences and Veterinary Medicine
                    Biological Sciences
                    Biological Sciences
                    Environmental Sciences
                    Environmental Sciences
                    Fisheries and Wildlife
                    Food Science and Human Nutrition
                    Geosciences
                    Geosciences
                    Geosciences
                    Planning and Design
                    Planning and Design
                    Planning and Design
          ▼Natural Sciences
                    Chemistry
                    Physics and Astronomy
                    Veterinary Medicine
          ▼Social Sciences
                    Anthropology
                    Criminal Justice
                    Political Science
                    Psychology
                    Social Work
                    Sociology
                    U. S. History
          ▼Arts and Letters
                    Art, Art History, Design, Museum Studies
                    Gender Studies
                    Linguistics and Language Learning
                    Philosophy
                    Religious Studies and Medieval & Renaissance Studies
          ▼Business
                    Business Education
                    Economics
                    Economics
          ▼Education
                    Kinesiology and Physical Education
                    Mathematics and Math Education
                    Mathematics and Math Education
                    Teacher Education
          ▼Engineering
                    Engineering Practice and Education
          ▼Human Medicine
                    Medicine
                    Nursing
                    Public Health
          ▼Law
                    Practice and Teaching of Law
          ▼Music
                    Music and Music Education

What I get (with parents listed on 1 record - note multiparent items show only once)

▼Topics
                    Accessibility
                    General Resources
                    Humanities
                    Sciences
▼Colleges
          ▼Communication Arts and Sciences
                    Advertising & Public Relations
                    Communication
                    Journalism
          ▼Agriculture and Natural Resources
                    Agriculture, Forestry, Horticulture, and Plant Sciences
                    Animal Sciences and Veterinary Medicine
                    Biological Sciences
                    Environmental Sciences
                    Fisheries and Wildlife
                    Food Science and Human Nutrition
                    Geosciences
                    Planning and Design
          ▼Natural Sciences
                    Chemistry
                    Physics and Astronomy
                    Veterinary Medicine
          ▼Social Sciences
                    Anthropology
                    Criminal Justice
                    Political Science
                    Psychology
                    Social Work
                    Sociology
                    U. S. History
          ▼Arts and Letters
                    Art, Art History, Design, Museum Studies
                    Gender Studies
                    Linguistics and Language Learning
                    Philosophy
                    Religious Studies and Medieval & Renaissance Studies
          ▼Business
                    Business Education
                    Economics
          ▼Education
                    Kinesiology and Physical Education
                    Mathematics and Math Education
                    Teacher Education
          ▼Engineering
                    Engineering Practice and Education
          ▼Human Medicine
                    Medicine
                    Nursing
                    Public Health
          ▼Law
                    Practice and Teaching of Law
          ▼Music
                    Music and Music Education

view configuration:

uuid: 10c1c075-c814-4acd-a582-eec60db3e0aa
langcode: en
status: true
dependencies:
  config:
    - taxonomy.vocabulary.inclusive_teaching_subjects
  module:
    - taxonomy
    - user
    - views_tree
id: inclusive_teaching_menu_view
label: 'Inclusive Teaching Menu View'
module: views
description: ''
tag: ''
base_table: taxonomy_term_field_data
base_field: tid
display:
  default:
    id: default
    display_title: Default
    display_plugin: default
    position: 0
    display_options:
      title: 'Inclusive Teaching Menu View'
      fields:
        name:
          id: name
          table: taxonomy_term_field_data
          field: name
          relationship: none
          group_type: group
          admin_label: ''
          entity_type: taxonomy_term
          entity_field: name
          plugin_id: term_name
          label: ''
          exclude: false
          alter:
            alter_text: false
            make_link: false
            absolute: false
            word_boundary: false
            ellipsis: false
            strip_tags: false
            trim: false
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: true
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: value
          type: string
          settings:
            link_to_entity: true
          group_column: value
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
          convert_spaces: false
        parent_target_id:
          id: parent_target_id
          table: taxonomy_term__parent
          field: parent_target_id
          relationship: none
          group_type: group
          admin_label: ''
          entity_type: taxonomy_term
          entity_field: parent
          plugin_id: field
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: target_id
          type: entity_reference_entity_id
          settings: {  }
          group_column: target_id
          group_columns: {  }
          group_rows: false
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
        tid:
          id: tid
          table: taxonomy_term_field_data
          field: tid
          relationship: none
          group_type: group
          admin_label: ''
          entity_type: taxonomy_term
          entity_field: tid
          plugin_id: field
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: value
          type: number_integer
          settings:
            thousand_separator: ''
            prefix_suffix: true
          group_column: value
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
      pager:
        type: none
        options:
          offset: 0
          items_per_page: null
      exposed_form:
        type: basic
        options:
          submit_button: Apply
          reset_button: false
          reset_button_label: Reset
          exposed_sorts_label: 'Sort by'
          expose_sort_order: true
          sort_asc_label: Asc
          sort_desc_label: Desc
      access:
        type: perm
        options:
          perm: 'access content'
      cache:
        type: tag
        options: {  }
      empty: {  }
      sorts: {  }
      arguments: {  }
      filters:
        status:
          id: status
          table: taxonomy_term_field_data
          field: status
          entity_type: taxonomy_term
          entity_field: status
          plugin_id: boolean
          value: '1'
          group: 1
          expose:
            operator: ''
            operator_limit_selection: false
            operator_list: {  }
        vid:
          id: vid
          table: taxonomy_term_field_data
          field: vid
          entity_type: taxonomy_term
          entity_field: vid
          plugin_id: bundle
          value:
            inclusive_teaching_subjects: inclusive_teaching_subjects
          expose:
            operator_limit_selection: false
            operator_list: {  }
      style:
        type: tree
        options:
          row_class: ''
          default_row_class: true
          type: ul
          main_field: tid
          parent_field: parent_target_id
          collapsible_tree: expanded
      row:
        type: fields
      query:
        type: views_query
        options:
          query_comment: ''
          disable_sql_rewrite: false
          distinct: false
          replica: false
          query_tags: {  }
      relationships: {  }
      header: {  }
      footer: {  }
      display_extenders: {  }
    cache_metadata:
      max-age: -1
      contexts:
        - 'languages:language_content'
        - 'languages:language_interface'
        - user.permissions
      tags: {  }
  block_1:
    id: block_1
    display_title: Block
    display_plugin: block
    position: 1
    display_options:
      display_extenders:
        views_evi: {  }
    cache_metadata:
      max-age: -1
      contexts:
        - 'languages:language_content'
        - 'languages:language_interface'
        - user.permissions
      tags: {  }

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Postponed: needs info

Component

Code

Created by

🇺🇸United States kwfinken Lansing, MI

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024