Notice: Undefined index: field_fixture in tablefield_field_widget_form() (line 237 of /var/www/test/sites/all/modules/contrib/tablefield/tablefield.module).
Notice: Undefined index: field_fixture in tablefield_field_widget_form() (line 312 of /var/www/test/sites/all/modules/contrib/tablefield/tablefield.module).
Notice: Undefined index: field_fixture in tablefield_field_widget_form() (line 313 of /var/www/test/sites/all/modules/contrib/tablefield/tablefield.module).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ddrozdik’s picture

I will try to fix this problem, a bit later.

stevesmename’s picture

Version: 7.x-2.0-beta4 » 7.x-2.0-beta6
Status: Active » Needs review
FileSize
2.56 KB

See applied patch, solves problem of rebuilding the table. Still having issues with importing of csv file.

Nexsoft’s picture

Thanks a lot! There is still a problem while having multiple instances of a field_collection, can't find a way right now to solve it.

Taxoman’s picture

Version: 7.x-2.0-beta6 » 7.x-2.x-dev

Can some more people who have already tested this patch chime in here in case we can get it committed to the -dev branch?

Gr3fweN’s picture

Status: Needs work » Needs review

Tried the patch, it kind of works but data that already exist got deleted :(
Also, it's only possible to rebuild tables once, if I do it twice, page reloads and I get ugly errors:

Notice: Undefined index: rebuild in tablefield_rationalize_table() (line 606 of /home/.../modules/tablefield/tablefield.module).
Notice: Undefined index: rebuild in tablefield_rationalize_table() (line 607 of /home/.../modules/tablefield/tablefield.module).
Notice: Undefined index: rebuild in tablefield_field_widget_form() (line 322 of /home/.../modules/tablefield/tablefield.module).
Notice: Undefined index: rebuild in tablefield_field_widget_form() (line 323 of /home/.../modules/tablefield/tablefield.module).

Havn't tried csv...

Taxoman’s picture

Status: Needs review » Needs work
MostlyGhostly’s picture

Status: Needs review » Needs work

I've applied the above patch, and don't really notice any difference, despite clearing cache, etc.

It returns:

Notice: Undefined index: colour in tablefield_field_widget_form() (line 238 of /home/.../sites/all/modules/tablefield/tablefield.module).
Notice: Undefined index: colour in tablefield_field_widget_form() (line 322 of /home/.../sites/all/modules/tablefield/tablefield.module).
Notice: Undefined index: colour in tablefield_field_widget_form() (line 323 of /home/.../sites/all/modules/tablefield/tablefield.module).

Followed by:

Status message Table structure rebuilt.

--

The result of this is the entire table disappearing. Clicking on "Show/Change number of rows and columns" shows the boxes to be empty. Entering anything in to this is fruitless, as they return empty anyway.

Interesting to see the difference in errors between myself and Gr3fweN though.

Gr3fweN’s picture

Anyone looking into this? I tried but without success :(

jamsilver’s picture

Status: Needs work » Needs review
FileSize
5.84 KB

I have been trying to use a tablefield inside a referenced entity using inline_entity_form. Basically the tablefield module ajax code assumes that it will be on the top-level of the form when this is not always necessarily the case.

The attached patch works for my use case - and I've given it a quick test on tablefields in a field_collection too and it seems to work.

markhalliwell’s picture

Pinolo’s picture

This patch is based on #9, applies to latest 7.x-2.x branch and hopefully 7.x-2.2

dahousecat’s picture

Issue summary: View changes

Just used the patch from #11 and solved the issue for me - the rebuild table function now works fine in a field collection. Thanks.

The only remaining issue is after having re-built the table I am no longer able to edit any of the default values in the table. Where there were inputs there are now just labels.

Also any text I entered before re-building the table is lost after the table is re-built.

This patch still makes the module usable (with field_collection) but is by no means perfect...

dragonfire353’s picture

The patch did not work for me, well completely. It made it possible at least but I have to jump through hoops; I have to try rebuilding the one that isn't last, then rebuild the last one, which will actually rebuild the one I just tried rebuilding, very odd. Same thing for csv. Have yet to be able to fix this problem as I'm still new to drupal development..

Also, if anyone else is having trouble with it not importing right and deal with macs, take a look at this: http://us3.php.net/manual/en/function.fgetcsv.php#87196

My work uses all macs and that solved it not importing correctly at least... wish I could figure out the other problem though...

Alexey.y’s picture

#13 I have the same problem. When i rebuild one table in field_collection others table changed to. I supplemented patch from #11

jaydee1818’s picture

These patches fail with security update 7.23

jaydee1818’s picture

jaydee1818’s picture

Sorry, ignore previous miss-fire ... this patch should work with 7.23

inakilz’s picture

I've tested the patch from #17 but it only works with the first table of a field collection.

inakilz’s picture

Status: Needs review » Needs work
tchopshop’s picture

The new patch on #17 is not working for me.

Sam152’s picture

#17 was a bit messed up for me. I have rerolled #14 against 7.x-2.3 which is now working correctly for me.

sistro’s picture

#21 works for me too, tnx Sam152 ;)

This patch fix also the same issue with "multifield" module

johnny5th’s picture

#21 seems to be working for me too!

likewhoa’s picture

Status: Needs review » Reviewed & tested by the community

works for me.

dragonfire353’s picture

#21 appeared to work for me at first, at least for rebuilding. But when saving it comes up blank. Importing csv doesn't work either, the first field collection item gets deleted and importing in the second one applies to the first one; although when you save it shows up for both.

dragonfire353’s picture

Status: Reviewed & tested by the community » Needs work
mikeker’s picture

Status: Needs work » Reviewed & tested by the community

+1 for #21 with regards to rebuild table working. I tested with single- and multi-valued Tablefields as well as Tablefields in Field Collections. The rebuild table works as expected.

However the import CSV option does not work for Tablefields in a collection as the #name on the import buttons is the same.

In the interest of moving this issue along, I'll open another issue around the import problems.

mikeker’s picture

dragonfire353’s picture

I can confirm the rebuilding works, something is messed up on my site causing it to not work correctly. Tested in a fresh environment, as I should have before, and it worked as expected.

vitalie’s picture

Status: Reviewed & tested by the community » Closed (fixed)
Tart0’s picture

#21's patch work for me. Thanks !