Needs review
Project:
Field Collection Table
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Sep 2011 at 13:16 UTC
Updated:
22 Sep 2014 at 11:37 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
naoliva commentedI would like to point out that the fact of having a single record for a given field_collection, once possible and accepted by the modules configuration, it is completely regular. There is no reason why field_collection table could not work accordingly in this situation.
That's why in my point of view, this is a minor bug instead of a desirable feature.
Comment #2
jeremymcminn commentedIs there a fix for this?
Comment #3
pvdsteen commentedHerewith a quick and dirty fix:
Open 'theme.inc' inside the Field Collection Table module.
Find the following function: theme_field_collection_table_multiple_value_fields
In this function #cardinality (line 42 in 7.x-1.0-beta1 version) value needs to be changed from >1 to >0.
Before:
if (isset($element['#cardinality']) && ($element['#cardinality'] > 1 || $element['#cardinality'] == FIELD_CARDINALITY_UNLIMITED)) {After:
if (isset($element['#cardinality']) && ($element['#cardinality'] > 0 || $element['#cardinality'] == FIELD_CARDINALITY_UNLIMITED)) {*edit: For some reason an empty TH and TD are generated when applying this change.
have not been able to figure out why...
Comment #4
PawelR commentedI think we can remove this check for cardinality.
If I choose table widget and set number of values to 1 I still expect this to be rendered as a table, otherwise I can change the widget.
Comment #5
PawelR commentedI'm also sharing this patch, it's re-rolled #4 to apply nicely with #1438266-23 which we also use in our make file.