Empty rows are not being hidden from display.

Here is the patch I used to fix it for me.

index 75c42d7..2a9e23c
--- sites/all/modules/contrib/tablefield/tablefield.module
+++ sites/all/modules/contrib/tablefield/tablefield.module

@@ -2091,12 +2091,12 @@ function tablefield_hide_rows($tabledata, $ignore_head = FALSE) {
     // Removes the weight key.
     unset($value['weight']);
     $empty = TRUE;

     if (is_array($value)) {
       foreach ($value as $k2 => $v2) {
         if (!empty($v2)) {
           // Stop traversing at the first non empty value.
-          if (!$ignore_head || ($ignore_head && $k2 !== 'row_0')) {
+          if (!$ignore_head || ($ignore_head && $k2 !== 'col_0')) {
             $empty = FALSE;
           }
         }

Comments

nelsondovale created an issue. See original summary.

pieter.vanhove’s picture

StatusFileSize
new1.06 KB

Patch doesn't work by itself, I also needed to pass the setting, otherwise $ignore_head will always be false.

Added patch with both changes.

pieter.vanhove’s picture

Status: Patch (to be ported) » Needs review
lolandese’s picture

Thanks for the patch.

Can you please describe how to replicate the issue for the 7.x-3.x version? I tried but everything seems to work as expected.

lolandese’s picture

Status: Needs review » Postponed (maintainer needs more info)
liam morland’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Drupal 7 is no longer supported. If this applies to a supported version, please re-open.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.