- Issue created by @bakop
- Merge request !9Issue #3410535: The visual of the field is broken in Drupal 10.2.0 → (Merged) created by bakop
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 2:10pm 22 December 2023 - 🇫🇷France bakop Lille
Patch sent as merge request (MR!9) !
It works only for version >=10.2.0 so a new release should be published. - 🇯🇴Jordan Ahmad Khader
I can confirm that this is causing tabledrag.js to not work properly and is throwing an Uncaught TypeError: Cannot read properties of undefined (reading 'colSpan')
@bakop, we could change the PR to follow the normal core behavior by adding an empty tr tag.
$header = [ [ 'data' => [ '#prefix' => '<h4' . $header_attributes . '>', '#markup' => $element['#title'], '#suffix' => '</h4>', ], 'colspan' => 2, 'class' => ['field-label'], ], [], t('Order', [], ['context' => 'Sort order']), ];
What do you think?
- Status changed to Needs work
12 months ago 2:31pm 11 January 2024 - 🇺🇸United States markdorison
I just left a comment with an idea on how to not drop support for versions < 10.2 and there is a different idea presented in #7. Marking this as needs work so we can see what else we can come up with.
- Assigned to bakop
- Status changed to Active
12 months ago 3:32pm 11 January 2024 - Issue was unassigned.
- Status changed to Needs review
12 months ago 3:49pm 11 January 2024 - 🇫🇷France bakop Lille
Hello, you are both right. I modified and tested the code on versions 10.1.7 and 10.2.1
- 🇯🇴Jordan Ahmad Khader
thanks @bakop
I can also confirm that the code worked on 10.2.1. - 🇺🇸United States markdorison
I pushed a revision that I believe should accomplish the same thing, but without duplicating the entire $header array. There may be a more elegant way to do this but this was my best idea so far. Could you test to ensure this approach resolves the issue?
- 🇮🇳India Sandeep_k New Delhi
I've Tested this on a freshly installed Drupal version- 10.2.2-dev & able to reproduce this issue there as well. After reproducing this I've applied the shared patch MR !9 mergeable successfully and it looks good to me.
Testing Steps:
- Set up a Drupal 10.2
- Enable/Install the Require on Publish module
- Creates a content type with a referenced field (taxonomy) Select 'Required on Publish' with an allowed number of values set to "Unlimted" or at least "2"
- Create a node> for the newly created content type.
- Scroll down to the referenced field (taxonomy)- Shared before result.
- Download the shared patch & apply.
- Go to> Newly created content type> Scroll down to the referenced field (taxonomy) and re-verify this.
Testing Results:
After applying the patch, the "Show row weights" button is present now. RTBC+ - Status changed to RTBC
11 months ago 12:56pm 26 January 2024 - 🇩🇪Germany stborchert
Thanks for the patch. We stumbled across this issue after updating to Drupal 10.2 and all paragraph forms were broken.
Without the patch you'll get the following javascript error:
Cannot read properties of undefined (reading 'colSpan')
-
markdorison →
committed 9890a5e4 on 8.x-1.x authored by
bakop →
Issue #3410535 by bakop, markdorison, Sandeep_k, Ahmad Khader,...
-
markdorison →
committed 9890a5e4 on 8.x-1.x authored by
bakop →
- Status changed to Fixed
11 months ago 3:42pm 26 January 2024 Automatically closed - issue fixed for 2 weeks with no activity.