Like what the title says, using any upload field such as an image or file field causes the Table data to disappear. I have a Table fields, as well as a file and image field in my content type. When creating a node everything seems to be fine, but when I edit a node later, if I do any operations (Upload, remove) on files, such as adding a new image, removing an image, adding a new file or removing one, the data in the table is gone. What's more is that the table itself is completely gone. Only the 'Change Number of Rows/Columns' and 'Import from CSV' options are there. Under Change number of rows and columns both rows and columns are set to 0. I can change those numbers and rebuild the table, but of course there is no longer any data in them.
This seems to be something that is AJAX related, as I can alter alt or title information on an image or file, it's only when I do some AJAX related operation like adding afile or removing one that it causes issues.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | tablefield_rebuild-for-users-no-rebuild-permission_1103020_12.patch | 4.71 KB | vitalie |
| #4 | 1103020-ajax-tablefield-4-d7.patch | 695 bytes | frega |
Comments
Comment #1
kevin hankens commentedWow, that stinks, sorry to hear that. I tried replicating it on a new install, but could not make the table data disappear as you describe.
It certainly sounds ajax related, but I'm going to need some more information about your local environment to hopefully replicate.
Thx for the report. Hopefully we can nip this in the bud!
Comment #2
ryan.armstrong commentedThis is up on a cloud slice hosted at www.stormondemand.com. We're running CentOS in you typical LAMP stack. The server is being run by Aegir. Whatever information you need I can provide, let me know what would help you out!
Comment #3
kevin hankens commentedWhat other content related modules are you using?
Also, can you do some debugging using firefox? If you watch the 'net' tab in firebug, you can see the responses. You might be able to see what's happening when an ajax request fires. Otherwise, it's going to be a tough exercise to see what's happening to the form_state when something gets submitted :(
Comment #4
frega commentedI ran into the same issue. I think i was able to track it down to this line 244ff in tablefield.module:
On an ajax submit, the assumed key 'tablefield' is not properly populated (whilst 'value' is). That - at least on my site - produces said behaviour.
One line patch attached - i don't grok enough of the field/form-API or tablefield.module to really be sure this doesn't create any side-effects, though so YMMV.
Comment #5
ryan.armstrong commentedI can confirm that this fixed my issue as well! Thanks for the patch frega! Let's roll this in :)
Comment #6
kevin hankens commentedNice, awesome work!
I'll give it a whirl and get it committed asap.
I think it's time for a beta!
Comment #7
kevin hankens commentedCommitted and added to beta3 release.
Thanks!!
Comment #8
itserich commentedThis patch is missing from Beta 5, and still appears to fix the problem.
Tables are also being deleted when a node is updated via Editablefields, do not know if it is a similar problem. This patch does not fix that problem.
http://drupal.org/project/editablefields
Comment #9
acrollet commentedThis issue appears to have been fixed in beta6.
Comment #10
eugis commentedHi all,
this problem still was found in 7.x-2.4 version. It happens only if user don't have "rebuild tablefield" permission ("Restrict rebuilding to users with the permission "rebuild tablefield"" box is on in field settings).
Comment #11
Leeteq commentedData loss = "critical".
Comment #12
vitalie commentedThank you @eugis. Could you help in testing the attached patch?
Comment #14
vitalie commented