I just updated to 7.x-1.x-dev that was released on Dec 2, 2015.
There is a regression in here that may take some time to explain.
I have a table group where the rows are defined by time and the columns field a field named room. The table group is only rendering columns that have values for the last row in the table.
This is the data I have
Room 1 Room 2 Room 3
10:00am Biology Comp. Sci Math
11:00am Lunch
However, we only get the columns present in the last row so end up with
Room 1
10:00am Biology
11:00am Lunch
This is happening because we have the following in tablegroup_plugin_style_tablegroup.inc
foreach ($rows as $row_header => $row) {
// Group by column:
$columns = $this->render_grouping($row, $opt['col_grouping']);
$cols = array_merge($cols, array_diff(array_keys($columns), $cols));
$table['raw'][$row_header] = $columns;
}
so $columns is the result of render_grouping for the last row.
Then we set up the table_headers based on the values in $columns.
I fixed this by keeping a separate array of all the columns found in all the rows and then using that to create table headers.
Comment | File | Size | Author |
---|---|---|---|
#6 | tablegroup-2627776-6-missing-columns.patch | 1.24 KB | antiorario |
Comments
Comment #2
C-LogemannComment #3
mstrelan CreditAttribution: mstrelan commentedManually applying the patch works, but it needs a reroll. Something odd about the file name at the top of the patch.
Comment #4
mandus.cz CreditAttribution: mandus.cz commentedWorks (manual editing), but not working Preload all terms/allowed values for referenced entity.
Comment #5
P2790 CreditAttribution: P2790 commented@bkat thanks for this fix. Anyone know how to fix the patch so that it applies correctly?
Comment #6
antiorario CreditAttribution: antiorario commentedHere's a reroll of the patch, minus the spelling fixes. As tempting as it is to include spelling fixes in a functional patch, they should be fixed by opening a separate issue and patch.
Comment #7
kumkum29 CreditAttribution: kumkum29 commentedThanks Antiorario !
your patch solves the bug on my site.
Please insert this patch in the next version of the module...
Comment #8
antiorario CreditAttribution: antiorario commentedComment #9
Jorge Navarro CreditAttribution: Jorge Navarro commentedPatch #6 solves the problem.
Comment #10
Jej CreditAttribution: Jej commentedThanks to #6 patch!