Active
Project:
Field collection
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Dec 2011 at 15:55 UTC
Updated:
16 Mar 2015 at 18:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dandaman commentedAlso, when a view based on a field collection is created, using this back reference to the node will allow you to access the node's nid and other basic information but all of the fields are blank. See this example view below:
Comment #2
dandaman commentedI updated the title to better describe the issue. Basically, listing Field Collection data in a view and referencing the nodes that include the field collection allow you to access the basic data of a node, but the node's data that are in fields just show up as blank.
Comment #3
dandaman commentedThis is something that helped me get the relationship working at all.
Comment #4
tim.plunkettMarking 'needs review' since there is a patch.
Comment #6
dandaman commentedOK, attempted uploading it again for review... this at least gets a relationship working from a Field Collection to a Node, although it sill has the problem of fields not being able to be related, for some reason.
Comment #7
blackandcode commented#6: 1379008-field-collection-relationship-2.patch queued for re-testing.
Comment #8
tirdadc commentedThat patch doesn't work as far as the table name goes:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'blabla_db.field_data_field_collection_gallery_collection' doesn't existOnce you fix the table name by removing the _collection at the end, you get:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_collection_item_field_data_field_collection_gallery__field_data_field_collection_gallery.field_collection_gallery_collection_value' in 'on clause'so you need to fix that by also removing the _collection there for the column name (which is how it was before the patch).
Once the SQL errors are gone, it still doesn't function when I require the relationship (I can't get my relationship to force the view to list only recent files that were uploaded through a "gallery collection field > file field" in this case).
Comment #9
tim.plunkettWell there is no point to #4, as that is exactly what _field_sql_storage_tablename does for non-deleted fields anyway.
I've not had this problem, can you add exact steps to reproduce?
Comment #10
dandaman commentedTim,
I was having troubles with this on my local machine during development, but then when I moved it to staging it no longer had this problem. So I'm not sure what the problem is and, to the extent I need it, it is fixed. Thanks for your help.
Comment #11
dvega commented#8: 1379008-field-collection-relationship-8.patch queued for re-testing.
I still cannot relate the field collection with a node...
Comment #12
jsheffers commentedHas anyone been able to successfully do this?
Comment #13
kaizerking commentedthis still is a bug
we cannot related a field collection field to node.
I tried using views cross join module as work around,even that doesn't work as views cross join is joins at item_id, what we need is join at field name.
can some one patch plz
Comment #14
nodecode commentedThe patch appears to do nothing to solve the problem...
@tim.plunkett
Here are the steps to reproduce:
1. Install Entity API 7.x-1.1, Entity Reference 7.x-1.0
2. Add a field collection field field_my_field_collection to the Article the content type
3. Add an entity reference field field_related_content to the field collection you just created
4. Import the view below. Note that it contains the relationship "A bridge to the Field collection item entity that is referencing Content via field_related_content"
5. While in the Views UI, click on the Title field and notice that there is no option to select a relationship (i.e. we cannot get the title of the referencing entity).
Comment #15
melchior commentedany fix? :(
Comment #16
AhmadZain commentedTry to check this one it may help.
https://www.drupal.org/node/2010642