SAVE AN NODE ,IT IS:
* Notice: Undefined offset: 0 在 tablefield_field_validate() (行 95 在 D:\webserver\www.COM\sites\default\modules\tablefield\tablefield.module).
* Notice: Undefined offset: 0 在 tablefield_field_validate() (行 95 在 D:\webserver\www.COM\sites\default\modules\tablefield\tablefield.module).
* Notice: Undefined index: array_parents 在 field_default_form_errors() (行 343 在 D:\webserver\www.COM\modules\field\field.form.inc).
* Recoverable fatal error: Argument 2 passed to drupal_array_get_nested_value() must be an array, null given, called in D:\webserver\www.COM\modules\field\field.form.inc on line 343 and defined 在 drupal_array_get_nested_value() (行 6253 在 D:\webserver\www.COM\includes\common.inc).
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | tableexample.PNG | 12.18 KB | rinno.casca |
| #2 | 1113248-2.patch | 867 bytes | kevin hankens |
Comments
Comment #1
rinno.casca commentedI'm getting the same error on a local installation with drupal 7 for any node, please help.
Notice: Undefined offset: 0 in tablefield_field_validate() (line 99 of D:\xampp\xampp\htdocs\xampp\drupal\a\sites\all\modules\tablefield\tablefield.module).
Notice: Undefined index: array_parents in field_default_form_errors() (line 343 of D:\xampp\xampp\htdocs\xampp\drupal\a\modules\field\field.form.inc).
Recoverable fatal error: Argument 2 passed to drupal_array_get_nested_value() must be an array, null given, called in D:\xampp\xampp\htdocs\xampp\drupal\a\modules\field\field.form.inc on line 343 and defined in drupal_array_get_nested_value() (line 6253 of D:\xampp\xampp\htdocs\xampp\drupal\a\includes\common.inc).
Comment #2
kevin hankens commentedHey there. Thanks for the report. I haven't been able to replicate here, but I suspect this patch will help.
Also, can you tell me a little about your content type definition? e.g. is it a required field, unlimited value, etc.
Thx!
Comment #3
kevin hankens commentedComment #4
rinno.casca commentedI've tested your change and so far it works.
Field is required, limited value, 2 cols 30 rows.
If I could have 2 cols 30 rows set but have a "add one row" button to let users add one row, it would be great and inline with drupal unlimited standard for field types - just a suggestion.
Thank you.
Comment #5
rinno.casca commented++Also appending any unused rows without rebuilding the table as this causes loss of all data entered into the table.
Comment #6
kevin hankens commentedGreat, I'll commit that patch.
Regarding #5, I'm not sure I understand how to reproduce. Can you give me some more info?
Thx!
Comment #7
kevin hankens commentedCommitted to 7.x-2.0-beta4.
Thx!
Comment #8
rinno.casca commentedRegarding #5, "remove" not "append" and there is no loss of data - this was a problem on my side*
Please see attached png. My table, even though I've entered only 5 rows shows the other rows as blank, it would be great if it could automatically remove the unused rows, an alternative easier approach is to have a "trim" button that removes the unused rows using js.
I know I can rebuild the table with the only 5 rows and it works fine, but I can't think of a use case where showing empty rows is required.
Comment #9
rinno.casca commentedI got rid of the unused rows by adding this piece of code, this only removes them from display, leaves them in edit - temporary change, not appropriate for permanent.
++ line 644 in tablefield.module