No tree visible on clean install on Drupal 10

Created on 13 February 2023, about 2 years ago
Updated 21 February 2023, about 2 years ago

Problem/Motivation

I've been using Hierarchy Manager for a few years now in Drupal 8 and 9 with very few issues and relying on the CDN access is per the default behaviour.

But I've just added it to a fairly clean Drupal 10 site and I'm not seeing a tree on a single Taxonomy vocab to which I have applied it.

Step-by-Step

  1. Set up a hierarchical Taxonomy called mathematics_syllabus
  2. Populate the mathematics_syllabus taxonomy with a tree
  3. Install this module
  4. Configure a new (default) Display plugin as JSTree using /admin/structure/hm_display_profile
  5. Configure mathematics_syllabus taxonomy to use the Display profile at /admin/config/user-interface/hierarchy_manager/config

Then on visiting the 'List' page for the mathematics_syllabus taxonomy and what I see is...

But the underlaying markup for what should be the tree is empty...

Or at least, the JS magic isn't kicking and rendering a tree inside the div class="hm-jstree"

Can anyone please help to me to see whether I have missed something obvious?

NOTE that inspection of the <head> shows that the JSTree assets appear to be being loaded as expected from the CDN

Thanks

🐛 Bug report
Status

Fixed

Version

3.3

Component

Miscellaneous

Created by

🇬🇧United Kingdom SirClickALot Somerset

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

Comments & Activities

  • Issue created by @SirClickALot
  • 🇦🇺Australia mingsong 🇦🇺

    Any error in the Drupal log or the browser console?

  • 🇬🇧United Kingdom SirClickALot Somerset

    Ah yes, Console errors related to the .JS ...

    Uncaught TypeError: $(...).once is not a function
        at Object.attach (hm.jstree.js?rq0wy2:12:10)
        at drupal.js?v=10.0.3:166:24
        at Array.forEach (<anonymous>)
        at Drupal.attachBehaviors (drupal.js?v=10.0.3:162:34)
        at drupal.init.js?v=10.0.3:32:12
        at HTMLDocument.listener (drupal.init.js?v=10.0.3:20:7)
    attach @ hm.jstree.js?rq0wy2:12
    (anonymous) @ drupal.js?v=10.0.3:166
    Drupal.attachBehaviors @ drupal.js?v=10.0.3:162
    (anonymous) @ drupal.init.js?v=10.0.3:32
    listener @ drupal.init.js?v=10.0.3:20
    setTimeout (async)
    Drupal.throwError @ drupal.js?v=10.0.3:63
    (anonymous) @ drupal.js?v=10.0.3:168
    Drupal.attachBehaviors @ drupal.js?v=10.0.3:162
    (anonymous) @ drupal.init.js?v=10.0.3:32
    listener @ drupal.init.js?v=10.0.3:20
    drupal.js?v=10.0.3:64 Uncaught TypeError: $(...).once is not a function
        at Object.attach (hm.jstree.js?rq0wy2:12:10)
        at drupal.js?v=10.0.3:166:24
        at Array.forEach (<anonymous>)
        at Drupal.attachBehaviors (drupal.js?v=10.0.3:162:34)
        at big_pipe.js?v=10.0.3:98:14
        at Array.forEach (<anonymous>)
        at bigPipeProcessDocument (big_pipe.js?v=10.0.3:97:55)
        at big_pipe.js?v=10.0.3:121:12
    attach @ hm.jstree.js?rq0wy2:12
    (anonymous) @ drupal.js?v=10.0.3:166
    Drupal.attachBehaviors @ drupal.js?v=10.0.3:162
    (anonymous) @ big_pipe.js?v=10.0.3:98
    bigPipeProcessDocument @ big_pipe.js?v=10.0.3:97
    (anonymous) @ big_pipe.js?v=10.0.3:121
    setTimeout (async)
    Drupal.throwError @ drupal.js?v=10.0.3:63
    (anonymous) @ drupal.js?v=10.0.3:168
    Drupal.attachBehaviors @ drupal.js?v=10.0.3:162
    (anonymous) @ big_pipe.js?v=10.0.3:98
    bigPipeProcessDocument @ big_pipe.js?v=10.0.3:97
    (anonymous) @ big_pipe.js?v=10.0.3:121
    setTimeout (async)
    bigPipeProcess @ big_pipe.js?v=10.0.3:120
    (anonymous) @ big_pipe.js?v=10.0.3:127
    (anonymous) @ big_pipe.js?v=10.0.3:137
    drupal.js?v=10.0.3:64 Uncaught TypeError: $(...).once is not a function
        at Object.attach (hm.jstree.js?rq0wy2:12:10)
        at drupal.js?v=10.0.3:166:24
        at Array.forEach (<anonymous>)
        at Drupal.attachBehaviors (drupal.js?v=10.0.3:162:34)
        at HTMLUListElement.<anonymous> (ajax.js?v=10.0.3:1336:20)
        at Function.each (jquery.min.js?v=3.6.3:2:3003)
        at E.fn.init.each (jquery.min.js?v=3.6.3:2:1481)
        at Drupal.AjaxCommands.insert (ajax.js?v=10.0.3:1334:21)
        at ajax.js?v=10.0.3:1008:41
    attach @ hm.jstree.js?rq0wy2:12
    (anonymous) @ drupal.js?v=10.0.3:166
    Drupal.attachBehaviors @ drupal.js?v=10.0.3:162
    (anonymous) @ ajax.js?v=10.0.3:1336
    each @ jquery.min.js?v=3.6.3:2
    each @ jquery.min.js?v=3.6.3:2
    insert @ ajax.js?v=10.0.3:1334
    (anonymous) @ ajax.js?v=10.0.3:1008
    setTimeout (async)
    Drupal.throwError @ drupal.js?v=10.0.3:63
    (anonymous) @ drupal.js?v=10.0.3:168
    Drupal.attachBehaviors @ drupal.js?v=10.0.3:162
    (anonymous) @ ajax.js?v=10.0.3:1336
    each @ jquery.min.js?v=3.6.3:2
    each @ jquery.min.js?v=3.6.3:2
    insert @ ajax.js?v=10.0.3:1334
    (anonymous) @ ajax.js?v=10.0.3:1008
    Promise.then (async)
    (anonymous) @ ajax.js?v=10.0.3:1001
    Drupal.Ajax.commandExecutionQueue @ ajax.js?v=10.0.3:998
    Drupal.Ajax.success @ ajax.js?v=10.0.3:1055
    bigPipeProcessPlaceholderReplacement @ big_pipe.js?v=10.0.3:66
    bigPipeProcessDocument @ big_pipe.js?v=10.0.3:105
    (anonymous) @ big_pipe.js?v=10.0.3:121
    setTimeout (async)
    bigPipeProcess @ big_pipe.js?v=10.0.3:120
    (anonymous) @ big_pipe.js?v=10.0.3:127
    (anonymous) @ big_pipe.js?v=10.0.3:137
    drupal.js?v=10.0.3:64 Uncaught TypeError: $(...).once is not a function
        at Object.attach (hm.jstree.js?rq0wy2:12:10)
        at drupal.js?v=10.0.3:166:24
        at Array.forEach (<anonymous>)
        at Drupal.attachBehaviors (drupal.js?v=10.0.3:162:34)
        at HTMLAnchorElement.<anonymous> (ajax.js?v=10.0.3:1336:20)
        at Function.each (jquery.min.js?v=3.6.3:2:3003)
        at E.fn.init.each (jquery.min.js?v=3.6.3:2:1481)
        at Drupal.AjaxCommands.insert (ajax.js?v=10.0.3:1334:21)
        at ajax.js?v=10.0.3:1008:41
    attach @ hm.jstree.js?rq0wy2:12
    (anonymous) @ drupal.js?v=10.0.3:166
    Drupal.attachBehaviors @ drupal.js?v=10.0.3:162
    (anonymous) @ ajax.js?v=10.0.3:1336
    each @ jquery.min.js?v=3.6.3:2
    each @ jquery.min.js?v=3.6.3:2
    insert @ ajax.js?v=10.0.3:1334
    (anonymous) @ ajax.js?v=10.0.3:1008
    setTimeout (async)
    Drupal.throwError @ drupal.js?v=10.0.3:63
    (anonymous) @ drupal.js?v=10.0.3:168
    Drupal.attachBehaviors @ drupal.js?v=10.0.3:162
    (anonymous) @ ajax.js?v=10.0.3:1336
    each @ jquery.min.js?v=3.6.3:2
    each @ jquery.min.js?v=3.6.3:2
    insert @ ajax.js?v=10.0.3:1334
    (anonymous) @ ajax.js?v=10.0.3:1008
    Promise.then (async)
    (anonymous) @ ajax.js?v=10.0.3:1001
    Drupal.Ajax.commandExecutionQueue @ ajax.js?v=10.0.3:998
    Drupal.Ajax.success @ ajax.js?v=10.0.3:1055
    bigPipeProcessPlaceholderReplacement @ big_pipe.js?v=10.0.3:66
    bigPipeProcessDocument @ big_pipe.js?v=10.0.3:105
    (anonymous) @ big_pipe.js?v=10.0.3:121
    setTimeout (async)
    bigPipeProcess @ big_pipe.js?v=10.0.3:120
    (anonymous) @ big_pipe.js?v=10.0.3:127
    (anonymous) @ big_pipe.js?v=10.0.3:137
  • 🇦🇺Australia mingsong 🇦🇺

    Any error or warning in Drupal logs?

  • 🇬🇧United Kingdom SirClickALot Somerset

    Hi @Minsong

    Absolutely nothing in the logs at all: No errors, no warnings.

  • @mingsong opened merge request.
    • Mingsong authored 6e519e96 on 3.x
      Issue #3341369 by SirClickALot, Mingsong: No tree visible on clean...
  • Status changed to Fixed about 2 years ago
  • 🇦🇺Australia mingsong 🇦🇺
  • 🇦🇺Australia mingsong 🇦🇺

    I believe this issue is fixed in 3.3.1.

Production build 0.71.5 2024