Problem/Motivation
On the latest Drupal 11 (haven't bisected the exact version it broke), drag-and-drop in an entity_reference_hierarchy field fails with a JS error Uncaught TypeError: Cannot read properties of undefined (reading 'matches') in tabledrag.js. The only way to nest items is by manually updating the Depth/Order fields.
Steps to reproduce
Install module on latest Drupal 11. Add the field type to an entity. On the entity add/edit form, note that the drag and drop functionality for moving items within the hierarchy is broken.
Proposed resolution
Issue appears to be related to a change of some tabledrag class names in core. Easy fix by updating entity_reference_hierarchy.module. Proposed MR will be added shortly.
Issue fork entity_reference_hierarchy-3584556
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
Comment #4
odenscComment #6
dwkitchen commentedThanks for finding, I will track down which version of Drupal introduced this change and split the releases.
Comment #9
dwkitchen commentedSeems it should have been like that since D9, but as I have been using IEF, I had missed it.
I have also made the same changes in the Paragraphs submodule.