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!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Kevin Hankens’s picture

Thanks 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.

Kevin Hankens’s picture

FileSize
1.14 KB

Ok, 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!

kiwidrop’s picture

It works like a charm :). You are a scholar and a gentleman, thank you!!!

Kevin Hankens’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Wolfgang Reszel’s picture

Version: 6.x-1.0 » 6.x-1.1
Status: Closed (fixed) » Needs work

I 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.

tobiasb’s picture

Version: 6.x-1.1 » 6.x-2.1
Status: Needs work » Reviewed & tested by the community
FileSize
2.33 KB

there is no dev version?

tobiasb’s picture

Status: Reviewed & tested by the community » Needs review

sorry :D

SirClickalot’s picture

Is 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?

loparr’s picture

Is the patch from #2 already applied in ver. 6.x-2.1? I am still getting the error. Thank you

  • Kevin Hankens committed 369396f on 8.x-2.x
    Bug report #742872: Fix for batch processing of nodes. Feature request #...

  • Kevin Hankens committed 369396f on 7.x-3.x
    Bug report #742872: Fix for batch processing of nodes. Feature request #...
lolandese’s picture

Issue summary: View changes
Priority: Critical » Normal
Status: Needs review » Closed (won't fix)

Fixed 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.