Select parents automatically option no longer works in version 2.0.0

Created on 10 March 2023, over 1 year ago
Updated 21 May 2023, about 1 year ago

Problem/Motivation

In version 8.x-1.1 you could configure the module, per field on the manage form display, to "Select parents automatically" and when using the widget it would check the parent items all the way up a tree of nested terms when you checked a child term. While the setting remains on the manage form display screen, the functionality no longer appears to work. There is no JS console error in the browser when interacting with the widget. This functionality (and more) is also broken in the 8.x-1.2 release due to some JS errors that were committed in that release (javascript booleans `true` and `false` changed to uppercase).

Steps to reproduce

  1. Install version 2.0.0 of this module.
  2. Configure a term reference field on a node type with a vocabulary that has terms in a hierarchy to use this widget and check the "Select parents automatically" option on the manage form display screen.
  3. Visit the node add or edit screen for the node type configured above and try to check a child item in the tree of terms. Notice the parent terms aren't selected.

Proposed resolution

Identify the issue with changes to the module between 8.x-1.1 and 2.0.0 that caused this functionality to be lost and fix/restore it.

Remaining tasks

User interface changes

N/A

API changes

Data model changes

N/A

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States timwood Rockville, Maryland

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.

  • Issue created by @timwood
  • First commit to issue fork.
  • @jonraedeke opened merge request.
  • Status changed to Needs review over 1 year ago
  • Status changed to RTBC over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States timwood Rockville, Maryland

    Merge request provided and referenced by @jonraedeke in #4 above works to fix the issue for us.

  • πŸ‡ΊπŸ‡ΈUnited States KurtTrowbridge

    Reconfirming that this patch appears to fix both the "Select parents automatically" option mentioned here and the "Cascading selection" option, which also had settings in the form display widget that weren't taking effect in 1.2.0 or 2.0.0 like they did in 1.1.0. Thank you!

  • πŸ‡ΊπŸ‡ΈUnited States alexb7217

    I also just installed and tested the patch version and confirmed parent select and cascading select/deselect are working great.

    $ git clone -b 3347244-select-parents-automatically https://git.drupalcode.org/issue/term_reference_tree-3347244.git

    Then configured and tested as described in the documentation. ::thumbsup::

  • First commit to issue fork.
  • Status changed to Fixed about 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia VladimirAus Brisbane, Australia

    Thanks everyone! 🍻
    Committed!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024