Draggable table do not drag. Uncaught TypeError: Cannot read properties of undefined (reading 'colSpan')

Created on 17 April 2024, 8 months ago
Updated 22 May 2024, 7 months ago

Problem/Motivation

Draggable table items do not drag. The problem appears on custom field widgets during content edditing and occurred after the update core from 10.1 to 10.2.

In console, the following error is displayed:
"Uncaught TypeError: Cannot read properties of undefined (reading 'colSpan')"

Steps to reproduce

Create some custom plugin field widget (extends WidgetBase),
add entity reference field and set as multiple options,
use widget for field in form display

Proposed resolution

There's nothing really checking to make sure there's an object to get a property from there.
If there is no cell returned from the jQuery, then there is no cell[0] and thus no property. So I think this could be a difference in the table markup on a case-by-case basis which could foul this up.

Remaining tasks

Change the code.

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
FormΒ  β†’

Last updated 2 minutes ago

Created by

πŸ‡ΈπŸ‡°Slovakia roman.haluska

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024