Problem occurs in a node edit form. If removing an existing file that has been uploaded (such as an image) this error shows. On save, all data from the table is deleted.
From line 246 of tablefield.module - 7.x-2.0-beta5:
elseif ($form_state['submitted'] && isset($items[$delta])) {
// A form was submitted
$default_value = tablefield_rationalize_table($items[$delta]['tablefield']);
}
Replacing this with the code that was in line 246 of tablefield.module - 7.x-2.0-beta4 seems to fix the problem:
elseif ($form_state['submitted'] && isset($items[$delta]) && isset($items[$delta]['tablefield'])) {
// A form was submitted
$default_value = tablefield_rationalize_table($items[$delta]['tablefield']);
}
Comments
Comment #1
wiherek commentedit works. much appreciated.
Comment #2
acrollet commentedIssue #1103020: Using any upload field such as an image or file field causes the Table data to disappear has the same patch as this issue, closing as duplicate.