Found the workaround!
funkonaut - October 8, 2007 - 00:25
| Project: | CCK Fieldgroup Table |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
Description
I'm trying to get the fieldgroup_table module to work with Drupal-5.2 and CCK-1.6 but I'm not having any luck.
From my limited PHP skills it looks like the '#children' values aren't getting defined when fieldgroup_table.module builds the rows for the table.
Here's what I see in the output:
<table>
<thead><tr><th>Date</th><th>Billable hours</th><th>Description</th> </tr></thead>
<tbody>
<tr class="odd"><td 0="field_date" 1="0"></td><td 0="field_billable_hours" 1="0"></td><td 0="field_description" 1="0"></td> </tr>
</tbody></table>Any suggestions? I'm so close and yet so far...

#1
Hello? Is this thing on? Anyone home?
#2
HI! I also tried to use this modele, but since didn't work decided to make my own based on the original code.... Guess what? The code is ok... CCK's fieldgroup module is the problem (!?) This module is loaded with weight 9 into the "System" table.. so that the fieldgroup _form_alter runs after fieldgroup_table_form_alter, thus overriding it!
To fix the problem, change the database: in the System table, set the weight for fieldgroup_table to 9 or higher...
Is it possible to set this in the module's .info file? ex.: weight=9
#3
It must be done like so in the .install file
<?php
function fieldgroup_table_install() {
// Set weight higher than that of fieldgroup, since the form_alter must come after fieldgroup's.
$weight = db_result(db_query("SELECT weight FROM {system} WHERE type = 'module' AND name = 'fieldgroup'"));
db_query("UPDATE {system} SET weight = %d WHERE type = 'module' AND name = 'fieldgroup_table'", ($weight ? $weight : 0) + 20);
}
?>
#4