Closed (duplicate)
Project:
TableField
Version:
7.x-2.0-beta5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Nov 2011 at 12:55 UTC
Updated:
31 Jan 2012 at 22:02 UTC
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.