Hello

I have set up a content type and added tablefield fileds to it. I have one where i have set the default table values to be 5 rows by 5 cols. When i am in the UI trying to create a node and i need more rows and i go into the "Rebuild Table", the table rebuilds itself but i get these errors as well:

    Notice: Undefined index: cell_5_0 in tablefield_field_widget_form() (line 328 of W:\xampp\htdocs\drupalpr\sites\all\modules\tablefield\tablefield.module).
    Notice: Undefined index: cell_5_1 in tablefield_field_widget_form() (line 328 of W:\xampp\htdocs\drupalpr\sites\all\modules\tablefield\tablefield.module).
    Notice: Undefined index: cell_5_2 in tablefield_field_widget_form() (line 328 of W:\xampp\htdocs\drupalpr\sites\all\modules\tablefield\tablefield.module).
    Notice: Undefined index: cell_5_3 in tablefield_field_widget_form() (line 328 of W:\xampp\htdocs\drupalpr\sites\all\modules\tablefield\tablefield.module).
    Notice: Undefined index: cell_5_4 in tablefield_field_widget_form() (line 328 of W:\xampp\htdocs\drupalpr\sites\all\modules\tablefield\tablefield.module).
    Notice: Undefined index: cell_6_0 in tablefield_field_widget_form() (line 328 of W:\xampp\htdocs\drupalpr\sites\all\modules\tablefield\tablefield.module).
    Notice: Undefined index: cell_6_1 in tablefield_field_widget_form() (line 328 of W:\xampp\htdocs\drupalpr\sites\all\modules\tablefield\tablefield.module).
    Notice: Undefined index: cell_6_2 in tablefield_field_widget_form() (line 328 of W:\xampp\htdocs\drupalpr\sites\all\modules\tablefield\tablefield.module).
    Notice: Undefined index: cell_6_3 in tablefield_field_widget_form() (line 328 of W:\xampp\htdocs\drupalpr\sites\all\modules\tablefield\tablefield.module).
    Notice: Undefined index: cell_6_4 in tablefield_field_widget_form() (line 328 of W:\xampp\htdocs\drupalpr\sites\all\modules\tablefield\tablefield.module).
    Notice: Undefined index: cell_7_0 in tablefield_field_widget_form() (line 328 of W:\xampp\htdocs\drupalpr\sites\all\modules\tablefield\tablefield.module).
    Notice: Undefined index: cell_7_1 in tablefield_field_widget_form() (line 328 of W:\xampp\htdocs\drupalpr\sites\all\modules\tablefield\tablefield.module).
    Notice: Undefined index: cell_7_2 in tablefield_field_widget_form() (line 328 of W:\xampp\htdocs\drupalpr\sites\all\modules\tablefield\tablefield.module).
    Notice: Undefined index: cell_7_3 in tablefield_field_widget_form() (line 328 of W:\xampp\htdocs\drupalpr\sites\all\modules\tablefield\tablefield.module).
    Notice: Undefined index: cell_7_4 in tablefield_field_widget_form() (line 328 of W:\xampp\htdocs\drupalpr\sites\all\modules\tablefield\tablefield.module).

What can i do to fix this?

Thanks

Elvin Xhimitiku

Drupal in Albania

Comments

elvin - albania drupal developer’s picture

when i commented line 328 in the tablefield.module and set

$instance_default = array();

on the same line, the errors dont show up anymore when i recreate the table from the UI, but i know that i might have lost the ability to save the defaults.

Any idea?

elvin - albania drupal developer’s picture

apparently by doing what i said in the previus comment BROKE THE MODULE.

Please help

AtomicTangerine’s picture

Title: Issue when i try to rebuild the table when creating a node » Undefined Index error after "Rebuild Table" when creating a node

me too, http://drupal.org/node/1119320 said it was fixed with the April beta version, but that's what I have. sub too. tweaked issue name for clarification. Oh @elvin: if undo-ing your code change doesn't work, you can just disable, uninstall, then reinstall it, then update.php :)

dan_metille’s picture

Same problem here

elvin - albania drupal developer’s picture

Thanks a lot AtomicTangerine.

I actually didn't hack the module, i just commented few lines and added my own, so it was easy to revert.
Thanks for the tips though !!!

simon georges’s picture

Closing #1175486: Error message as a duplicate of this one.

simon georges’s picture

Cross-referencing #1119320: Undefined Index.

Daas’s picture

Title: Undefined Index error after "Rebuild Table" when creating a node » Error messages when changes number of rows/columns or upload csv file

Hello,

When setup a content type with a TableField I get the error messages below if:

I change the number of rows columns or upload a csv file.

Notice: Undefined property: stdClass::$type in entity_extract_ids() (line 7379 of C:\xampp\htdocs\vli\includes\common.inc).
Notice: Undefined index: field_name in locale_field_node_form_submit() (line 402 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Notice: Undefined index: in locale_field_node_form_submit() (line 404 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Notice: Undefined index: field_name in locale_field_node_form_submit() (line 402 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Notice: Undefined index: in locale_field_node_form_submit() (line 404 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Notice: Undefined index: field_name in locale_field_node_form_submit() (line 402 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Notice: Undefined index: in locale_field_node_form_submit() (line 404 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Notice: Undefined index: field_name in locale_field_node_form_submit() (line 402 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Notice: Undefined index: in locale_field_node_form_submit() (line 404 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Notice: Undefined index: field_name in locale_field_node_form_submit() (line 402 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Notice: Undefined index: in locale_field_node_form_submit() (line 404 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Notice: Undefined index: field_name in locale_field_node_form_submit() (line 402 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Notice: Undefined index: in locale_field_node_form_submit() (line 404 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Notice: Undefined index: field_name in locale_field_node_form_submit() (line 402 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Notice: Undefined index: in locale_field_node_form_submit() (line 404 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Notice: Undefined index: field_name in locale_field_node_form_submit() (line 402 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Notice: Undefined index: in locale_field_node_form_submit() (line 404 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Notice: Undefined index: field_name in locale_field_node_form_submit() (line 402 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Notice: Undefined index: in locale_field_node_form_submit() (line 404 of C:\xampp\htdocs\vli\modules\locale\locale.module).
Warning: Invalid argument supplied for foreach() in tablefield_delete_table_values() (line 512 of C:\xampp\htdocs\vli\sites\all\modules\tablefield\tablefield.module).

Does anyone have an idea where it went wrong?

Olmy’s picture

Still experiencing this issue in Drupal 7.7. Can't create any tables larger than 5x5.

michelhack’s picture

same as #9 i am in 7.8 and i cant change tables. please resolve this
tradestation programmer

derMatze’s picture

Component: Miscellaneous » Code

Any news on this issue...?

derMatze’s picture

Maybe this could be a hint to solve it:
http://drupal.org/node/982622

cattalk’s picture

Same problem here. No other table than 5x5 is possible. When I try to change the number of rows or columns I get the "Undefined index" error. When savin or previewing the node the changes made to the table are gone.

thx
cat

Anonymous’s picture

Temporary workaround that I found was to specify extremely large table size when creating the field and resizing it to the correct size on a per-node basis.

elvin - albania drupal developer’s picture

why go through all this hassle?

why not just use a wisiwyg textarea with a default value of an empty table with some predefined number of cols / rows?

Its easier to rebuild the table through the wysiwyg's interface?

it is a possible solution

simon georges’s picture

Isn't it fixed by #1119320: Undefined Index ?

jenlampton’s picture

Status: Active » Closed (outdated)

It sounds like it might be fixed by that issue, as there are no more comments after that. This is a very old issue, if the problem persists please reopen.