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 just checked my logs and saw a handful of the following PHP warnings from tablefield:
Warning: Invalid argument supplied for foreach() in theme_tablefield() (line 2455 of drupal/sites/all/modules/contrib/tablefield/tablefield.module).
Comment | File | Size | Author |
---|---|---|---|
#5 | Screen Shot 2019-08-22 at 2.27.35 PM.png | 195.04 KB | efrainh |
tablefield-prevent_php_warning.patch | 902 bytes | jenlampton | |
Comments
Comment #2
lolandese CreditAttribution: lolandese at HCL Technologies Limited commentedCan you give some steps to reproduce the issue?
Comment #3
lolandese CreditAttribution: lolandese at HCL Technologies Limited commentedComment #4
jenlampton> Can you give some steps to reproduce the issue?
I'm not seeing this issue in the 3.x branch of the module anymore. I expect it has been resolved differently. Closing issue.
Comment #5
efrainhI'm reopening this ticket because i just found the same issue. I'm providing the steps to reproduce it:
Comment #6
efrainhAnother issue that i found is that when trying to import a new CSV file on a node I had previously uploaded another CSV file and saved, it uploads the file and show its data but when i save the node the new data gets lost and the old data remains. So basically the first time i import the data using a CSV file it works correctly but the second time it doesn't because it doesn't overwrite the old data. I did the same steps described in #5 when this happened. The only message i see in the logs is the warning mentioned on this issue so i guess that is causing this.
Comment #7
lolandese CreditAttribution: lolandese commentedHi Efrain. Thanks for the steps you provided to reproduce the issue. Very helpful.
I could indeed trigger it on the 7.x-3.5 version, however, when doing the same steps with the dev version (7.x-3.x), all was fine. Similar as reported in comment #4 above.
The weird thing though is that that comment was made on 22 April, thus before the 7.x-3.5 was released (29 May). The only way forward IMHO is that if you confirm that the dev version solves your problem (not only on SimplyTest but in "real"). In that case, I will release a new stable version. Then we should keep our fingers crossed there is no different behavior between a dev and a stable version that use the same codebase. Theoretically, that is impossible. The only way that could happen is that the environment is spun up differently for a dev and a stable module. In that case, we should investigate further and maybe look into a solution like Invalid argument supplied for foreach() - Stack Overflow.
Please, test the dev version and let us know.