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...

HM UI- Settings

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

No Tree populated in the markup

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

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

SirClickALot created an issue. See original summary.

mingsong’s picture

Any error in the Drupal log or the browser console?

sirclickalot’s picture

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
mingsong’s picture

Any error or warning in Drupal logs?

sirclickalot’s picture

Hi@Minsong

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

mingsong’s picture

  • Mingsong authored 6e519e96 on 3.x
    Issue #3341369 by SirClickALot, Mingsong: No tree visible on clean...
mingsong’s picture

Status: Active » Fixed
mingsong’s picture

I believe this issue is fixed in 3.3.1.

Status: Fixed » Closed (fixed)

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