Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently using Drupal 8.3.0-rc2, Display Suite 8.x-3.0-beta1 and Field Group 8.x-1.0-rc6. When trying to drag a Field Group on the manage display tab, it throws a JS error:
Uncaught TypeError: Cannot read property 'relationship' of undefined
at Drupal.tableDrag.updateField (js_MVCuqoJ-vXm_ilLQ8XwCF9UtB9qdn5SC5ye4ma-OmeI.js:2265)
at Drupal.tableDrag.updateFields (js_MVCuqoJ-vXm_ilLQ8XwCF9UtB9qdn5SC5ye4ma-OmeI.js:2244)
at Drupal.tableDrag.dropRow (js_MVCuqoJ-vXm_ilLQ8XwCF9UtB9qdn5SC5ye4ma-OmeI.js:2084)
at HTMLDocument.<anonymous> (js_MVCuqoJ-vXm_ilLQ8XwCF9UtB9qdn5SC5ye4ma-OmeI.js:1551)
at HTMLDocument.dispatch (js_MVCuqoJ-vXm_ilLQ8XwCF9UtB9qdn5SC5ye4ma-OmeI.js:3)
at HTMLDocument.r.handle (js_MVCuqoJ-vXm_ilLQ8XwCF9UtB9qdn5SC5ye4ma-OmeI.js:3)
In field_group/includes/field_ui.inc line 189, I changed the line to:
'#attributes' => array('class' => array('field-group-type', 'field-region')),
And by adding the 'field-region' class I was again able to drag and drop the field group.
Will be uploading a patch shortly. Probably needs more testing to make sure this doesn't break other stuff. :)
Comment | File | Size | Author |
---|---|---|---|
#2 | 2866211-field_group-tabledrag-issue.patch | 567 bytes | Justin Langley |
Comments
Comment #2
Justin Langley CreditAttribution: Justin Langley as a volunteer commentedComment #3
baekelandt CreditAttribution: baekelandt at Wunder commentedJustin, thanks for reporting this issue. The patch that solves the underlying issue is provided in #2871702: "Widget" select is missing in manage form display after Drupal 8.2.7 to 8.3.1 update, so please try that one.
Greetings,
Edward