Closed (duplicate)
Project:
Field collection
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Sep 2011 at 16:29 UTC
Updated:
28 Aug 2012 at 14:03 UTC
Jump to comment: Most recent
Comments
Comment #1
craigmc commentedSubscribing-- also seeing this behavior.
Content Type:
my_node_type
has an unlimited field-collection: my_field_collection
My_field_collection has a taxonomy term reference: my_term_ref
I create a new my_node_type and set a value for my_field_collection of Taxonomy_Term_1
When I go to the taxonomy/term page for Taxonomy_Term_!, I get "There is currently no content classified with this term".
Comment #2
odegard commentedI've just starting looking into this module so my advice/understanding might be way off.
My impression is that this module works sortof like a node reference, but referencing a collection of fields, not a node per se. In D7, content types are nothing BUT a collection of fields, so perhaps this module could, instead of defining it's own "content type" aka collection of fields, use an existing content type as fieldable entity in the main content type...?
ANYWAY, to solve your particular problem, I think you'd have to make your own tax/term views. Make a page taking term as argument. Then add the field collection as a reference, then pass the argument to the term in the collection...
You should think of the term ref field inside the field collection as a term field for that particular field collection instance, not automatically belonging to the node where the field collection is added!
I hope that made some sense.
This is a module with very high potential!
Comment #3
hbellahc commentedHello
When you say : Then add the field collection as a reference
What it means please ?
Thanks in advance
Comment #4
odegard commentedSorry, I meant "relation". In views, click on advanced, relations and add the field name for the collectible field. This will "open up" the terms belonging to the collectible fields field in the content type.
Not sure exactly how to proceed from here. I would probably use the page manager in ctools to get the term in the url as a context and passing it to the view like that.
Comment #5
Jessica A commentedsubscribing
Comment #6
Tony Finlay commentedI've managed to get this working using views, if anyone wants to know how let me know here and I will write a tutorial, I am following this issue so will check regularly.
Comment #7
Jessica A commentedIf you could write a tutorial on how to accomplish this in views, that would be greatly appreciated!!
Comment #8
blenny commentedThis is because there is no content tagged with the term, therefore no content will be displayed on the term page. But i'm somewhat confused about what you're trying to do.
Comment #9
craigmc commentedall, the issue is that the taxonomy term relations from the field collection are not inherited back to the node that contains the field collection. Maybe this is by design, but I would imagine that if a given field collection (entity) were tagged with a given term, you would see something appear on the taxonomy/term page-- at least the field collection, if not the node that refers to it.
Take the analogy of a node reference. If the referenced node is tagged with a specific term, then the referenced node will appear in the /taxonomy/term page for that term. One would expect similar behavior from the referenced entity.
Ideally, since this module logically functions like the Multigroup CCK module from 6.x-3.x, we'd expect that if there are terms applied in the multigroup/field-collection, that they would apply to the containing node, hence why this issue is posted.
As for ways to solve this using Views, etc. Thanks for the offer. That may well be a work-around to achieve the desired result, but to my understanding of taxonomy, we at least should get the field-collection entity at taxonomy/term, if not the node itself. (Ideally the node itself).
Comment #10
aendra commentedAny updates on this? Or even better, any idea how to find a host-entity's NID given a particular taxonomy term attached within a field collection, whether as code or via Views?
I'm using field collection to do advanced author meta data and multiple authors, and am trying to create a page for each author showing which articles they've contributed to. Any help?
Thanks!
Comment #11
Tony Finlay commentedThis module now has a 7 dev release; http://drupal.org/project/taxonomy_image. I haven't tried it yet but it seems to have the functionality I was originally looking for.
Hopefully it's of some use to the others in here
Comment #12
aendra commentedIf it helps, I figured the easiest way to accomplish this was by accessing the SQL tables directly, and unhooking the taxonomy links associated with the vocabulary in question. Example below to list articles when taxonomy field named "field_byline_author" is within a field collection named "field_bylines".
Hope this helps someone -- I was scratching my head pretty furiously for awhile about how to manage this.
Comment #13
aendra commentedSo, that moment when you spend several hours coding something, before realizing you actually *can* do what you're wanting to do in Views, in under ten minutes?
Using the example above (unlimited value field collection named "field_bylines" containing a taxonomy field "field_author" and text field "field_position"), you can accomplish pretty much the exact same thing by creating the following view:
1. Create a view, call it whatever you want. Make path something like "author/%"
2. Click Advanced, Add a Relationship. Choose your field collection; in this case, "Content: Bylines"
3. Add a Contextual Filter. This will be the taxonomy field (I.e., "field_author"), should appear named something like: "(field collection item from field_bylines) Field collection item: Author". Tell it not to display anything when filter value is not in the URL.
Tah-dah. Should work. If you want your field collection listed in the results instead of the default user creating the content:
4. Under Format, click "Content". Change to "Fields".
5. Under Fields, Click Add and select "Content: Bylines". Change formatter to "Fields Only" and uncheck "Create a label". (Last two are my preference to tidy UI up)
Note that you'll have to supply the author's term id to the view instead of the term name (I've never figured how to supply a term name as an argument as opposed to a tid...).
Comment #14
kalman.hosszu commentedI set the issue's properties.
Comment #15
tim.plunkettI believe this is a duplicate of #1131872: Fieldcollection items that have a taxonomy field assigned and a term given are not shown on the corresponding taxonomy page