I have a node divided into tabs. One tab contains several fields in a multigroup table.
Another tab contains a computed field which has a count of the number of entries in the multigroup table. The computed code looks like this
$node_field[0]['value'] = db_result(db_query("SELECT count(*) from content_field_amend_no where vid = %d and field_amend_no_value is not null",$node->vid));
When I add another entry to the multigroup table and save the node. The computed field is not updated. I realize that the multigroup fields are kept in separate tables, but aren't they part of the same "node"? A new version is created, why isn't the computed field updated?
If I re-edit the node and save, the computed field updates correctly.
Comments
Comment #1
Roze-1 commentedSubscribing, facing same issue
Comment #2
Anonymous (not verified) commentedIt sounds like you're also experiencing this issue: #378312: Fields NOT computed in 'weight' order (see comment #3 for a temporary solution).
Marking as a duplicate.