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.
It looks like the code expects that if the matrix field has a fixed number of rows specified, there should always be an extra empty header cell added to the table (i.e. an empty cell gets added to row 0, column 0). Unfortunately, this is only a safe assumption if row labels have been specified. If they haven't, the result is that the rendered table has one more column than the data rows actually have (since the labels don't render).
Additionally, if a fixed number of rows is specified for the matrix field, but not all rows have data, the extra rows look really ugly in the rendered table.
Comments
Comment #1
GuyPaddock CreditAttribution: GuyPaddock commentedThe attached patch addresses both of these issue.
Comment #2
GuyPaddock CreditAttribution: GuyPaddock commentedSetting to NR.
Comment #3
intrafusionThanks for your input on this and several other issues, your patch has been added to the module
Comment #4
GuyPaddock CreditAttribution: GuyPaddock commentedHad to add on to this patch... saw side effects with tables that have one column and row labels.
An additional patch is attached.
Comment #5
intrafusionThanks for this update, this has been applied to the module