If the first term is unpublished, it behaves like a parent

Created on 6 August 2023, over 1 year ago

Problem/Motivation

The CSHS field displayed on a node works as expected using an entity reference to a taxonomy tree of a diverse set of published items of multiple depths.
When the first item in the taxonomy tree is unpublished, the CSHS field only shows children of the unpublished item, and no other items in the tree (as if the unpublished item is the Parent in the form display, although this is not the case). This behavior does not occur if you unpublish an item other than the first item in the tree.
The problem is that if the first item is unpublished you would expect to see the rest of the first level in the taxonomy tree, albeit with the unpublished term not visible, however, the other items in the tree at the first level are not displayed at all.

Steps to reproduce

  1. Create a taxonomy with several top-level terms and several children for each term (e.g. Banana > A, B, C, D; Apple > Q, R, S, T; Grape > L, M, N, O).
  2. Add a CSHS entity reference field to a content type, and display that in the form display with settings:
    1. Parent: None
    2. Hierarchy depth: Deepest
    3. Required depth: Deepest
    4. Force deepest: Yes
    5. Save lineage: No
    6. Level labels: None
  3. Create a new node - the taxonomy term tree displays as expected, with the first dropdown showing: Banana, Apple, Grape (and children display after selecting first item).
  4. Unpublish Apple.
  5. Create a new node - the taxonomy term tree displays as before, but without Apple.
  6. Republish Apple, and Unpublish Banana.
  7. The taxonomy term tree displays only: A, B, C, D. The tree should instead show Apple and Grape.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

3.6

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States SteelStrung

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

Comments & Activities

Production build 0.71.5 2024