Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm getting the following error message
"warning: Invalid argument supplied for foreach() in .../sites/all/modules/tablefield/tablefield.module on line 95."
when I publish/unpublish a node that has a tablefield in it (from the Administer › Content management > Content page). The tablefield in that node then becomes empty.
Thanks for your help!
Comment | File | Size | Author |
---|---|---|---|
#7 | tablefield_742872.patch | 2.33 KB | tobiasb |
#2 | tablefield-2722034-2.patch | 1.14 KB | Kevin Hankens |
Comments
Comment #1
Kevin Hankens CreditAttribution: Kevin Hankens commentedThanks for the report. I'm able to replicate it here. I'll do some exploring and see if I can get a patch written asap.
Comment #2
Kevin Hankens CreditAttribution: Kevin Hankens commentedOk, it looks like the bulk operations are only passing in a 'value' for the cck $items variable. I haven't looked too deep into which part is getting skipped, but this patch looks for the missing 'tablefield' piece of the $items variable and replaces it if it's not there. This fixes both the PHP warning and the loss of data on my install.
Let me know if this works for you and I'll push it asap.
Thx!
Comment #3
kiwidrop CreditAttribution: kiwidrop commentedIt works like a charm :). You are a scholar and a gentleman, thank you!!!
Comment #4
Kevin Hankens CreditAttribution: Kevin Hankens commentedComment #6
Wolfgang Reszel CreditAttribution: Wolfgang Reszel commentedI still have this bug with 6.x-1.1 when reordering nodes with DraggableViews. The (older) patch won't fix this. The Error is in line 96.
Comment #7
tobiasbthere is no dev version?
Comment #8
tobiasbsorry :D
Comment #9
SirClickalotIs the above patch (#7) going to be put into the release version since, IMHO, the module ought to work with unpublished nodes and well as published ones?
Comment #10
loparr CreditAttribution: loparr commentedIs the patch from #2 already applied in ver. 6.x-2.1? I am still getting the error. Thank you
Comment #13
lolandese CreditAttribution: lolandese commentedFixed for D7 and 8.
Closing as "Won't fix" because the Drupal 6 version is unsupported and the issue doesn't seem to appear on Drupal 7 or 8. If you believe it does, feel free to reopen the issue and change the version as appropriate.
Of course you can also reopen the issue if you provide a patch that fixes the issue.