Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Even though I've noticed similar issues within the issue queue for older versions of Field Collection, no matter how much I try I cannot get a View to pull the information through from a field collection using a 'relationship' in this beta version. Is this still an issue? My project depends on Field Collection as I need groups of fields to have unlimited values but without the ability to pull their information through via a view I'm not sure how to get around this? Is the plans to support this?
Thank you
Stephen
Comments
Comment #1
spessex CreditAttribution: spessex commentedPlease note that I have not explained myself properly here. Basically this issue is in respect of 'Node References' contained within a FC. I can pull all the fields and data from a FC with no issue but I cannot pull the associated fields and data from a content type that is connected via a node reference (using relationship).
I have re-pasted the following from a query I have posted to try and explain it better (from http://groups.drupal.org/node/276008).
Hi
If anyone can advise it would be most appreciated as I've been stuck on this for over 48 hours.
I can pull fields and their associated data into a View from two content types using a 'node reference' field type and specifying a 'relationship' within the View but for some reason I cannot appear to do this when the 'node reference field' is contained within a Field Collection. In this instance all it will do is bring back the field titles but without the data.
So to be clear, I have the following:
a 'Client Information' content type (ct);
a 'Job' ct;
the 'Job' ct has a 'Node reference' field (contained within a Field Collection) connecting it to the 'Client Information' ct;
I want my View to not only be able to pull the fields and associated data from the 'Job' ct (which I can do) but also the associated fields and data from the 'Client Information' ct;
it does work when using a 'relationship' to connect the type in the View if the 'node reference field' is not contained within a Field Collection, but as soon as it goes into a Field Collection it will not pull the data, only the fields.
Any suggestions?
Comment #2
spessex CreditAttribution: spessex commentedFor further information and note purposes it appears the main difference in 'adding a relationship' in a view with those 'node reference' fields 'not contained' within a 'Field Collection' and those 'contained' within a Field Collection is that;
1 - when the 'node reference' 'is not contained' within a FC there is an option to select 'Content: Name Of Field (field_name_of_field), Appears in: node:name_of_content_type - and this works and pulls in all the desired information (field titles and associated data).
whereas
2 - when the 'node reference' 'is contained' within a FC there is an option to select 'Content: Name Of Field (field_name_of_field)-reverse, Relate each Field collection item referencing the node through Name Of Field - this does not work and only pulls the field titles.
Comment #3
spessex CreditAttribution: spessex commentedFor further information and note purposes it appears the main difference in 'adding a relationship' in a view with those 'node reference' fields 'not contained' within a 'Field Collection' and those 'contained' within a Field Collection is that;
1 - when the 'node reference' 'is not contained' within a FC there is an option to select 'Content: Name Of Field (field_name_of_field), Appears in: node:name_of_content_type - and this works and pulls in all the desired information (field titles and associated data).
whereas
2 - when the 'node reference' 'is contained' within a FC there is an option to select 'Content: Name Of Field (field_name_of_field)-reverse, Relate each Field collection item referencing the node through Name Of Field - this does not work and only pulls the field titles.