Closed (fixed)
Project:
Field Collection Table
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
14 Jul 2011 at 20:07 UTC
Updated:
28 Sep 2011 at 17:17 UTC
I'm getting the following error:
Notice: Undefined index: #cardinality in theme_field_collection_table_multiple_value_fields() (line 233 of C:\wamp\www\contracts2\sites\all\modules\field_collection_table\field_collection_table.module).
Comments
Comment #1
tim.plunkettUm, wow. The theme function that is replacing makes the same assumptions about #cardinality being present. Can you provide more context, like what the url was, and what the settings were for the field collection and its items?
Comment #2
chalee commentedThe error comes up only when I switch from edit mode to view mode of a node for anode type called 'organisation' which has a 'organisation_contacts' field_collection field embedded.
The field_collection field has the following settings:
Required field: NO
Number of values: unlimited
Widget type: hidden
The collection has: text, list and Term reference fields
I'm using automatic url aliasing. In edit mode the url is ?q=node/2/edit
When I switch to view mode url becomes ?q=content/organisation-name
Comment #3
cmmkelly commentedHi,
I think I am getting the same error but under different circumstances, so I don't know if it might help in locating the issue...
I am using a file upload field in my field collection and when I have a browsed for the file and then clicked the Upload button, I get the error:
Notice: Undefined index: #title in theme_field_collection_table_multiple_value_field() (line 207 of C:\xampp\htdocs\lampchurch-drupal\sites\all\modules\field_collection_table\field_collection_table.module).
Comment #4
chalee commentedFurther investigating my problem I found out that the error was showing only for field_collection fields which have the widget type set to 'hidden'.
To solve this I replaced the if statement on the problematic line of code as follows:
Before change:
After the change:
Comment #5
tim.plunkettOkay, now I know why I couldn't reproduce, I've only used the embedded widget.
Comment #6
tim.plunkettThere might be a better fix, but adding an isset works well enough.
http://drupalcode.org/project/field_collection_table.git/commit/ac11831
Comment #8
tim.plunkettAlso fixed http://drupal.org/node/1293710 in response to #3 on this issue.