If you create a Profile and include a Term Reference field on it, the expected behavior would be that any profiles containing a specific term show up on that term's listing page. They do not.

For example:

  1. Create a Taxonomy named foo
  2. Create a term in that taxonomy named bar
  3. Add a term reference field to a profile type that references the foo taxonomy
  4. Create a profile and choose bar for the value of the term reference field mentioned above.
  5. Visit /foo/bar. You'll see There is currently no content classified with this term.

Is this a Profile2 limitation or a limitation of core taxonomy in showing entities other than nodes?

Comments

Daniel Schaefer’s picture

sub. Experiencing the same issue here.

gaele’s picture

A limitation of core, apparently: /foo/bar "displays all nodes associated with a term".
See http://api.drupal.org/api/drupal/modules--taxonomy--taxonomy.pages.inc/f...

The question then is: should the term reference field link to this page of nodes? Or to a page of profiles? If the latter, where should this be implemented: in profile2 or in taxonomy?

scottrouse’s picture

Wow. That seems to be a substantial core bug to me. Why allow term reference fields to be added fieldable entities in core if only one entity type (node) works with core taxonomy module? Anyone know if that's been filed as a bug/feature request against 8.x?

Anyway, back to the issue at hand. I don't think it would be a good idea for contributed modules to take over those term reference links (although, now that I say that, Views/Panels/etc are capable of doing that). If I had to choose today, I'd say that the behavior of Profile2 should stay the way it is (term reference fields link to core term pages) and we should file a bug report against core.

joachim’s picture

> That seems to be a substantial core bug to me.

It's really not. Core taxonomy pages are designed to be for listing content, ie nodes.

gaele’s picture

Yes, it is a core bug. The created link is wrong. You'd probably use a vocabulary just for profiles, in which case an overview of nodes is useless.
This also happens with users entities. #1363526: Term reference field on non-node entity links to wrong page.

I'll try to create a workaround for profiles/D7, using views. Any help appreciated.

joachim’s picture

> The created link is wrong. You'd probably use a vocabulary just for profiles, in which case an overview of nodes is useless.

In which case, you need to create new field formatters that link to where you want. I think there's an issue on which I commented about that: a term ref formatter that links to a View.

gaele’s picture

Status: Active » Closed (duplicate)

#1016942: Allow taxonomy/term pages to list multiple entity types
(includes a workaround using a new field formatter)

coolhandlukek2’s picture

+1 -- This worked fine in D6 content profile and taxonomy term reference. A bit of a show stopper for me when looking at running a D6 to D7 migration

coolhandlukek2’s picture

Hi - I read this post with dismay since I have a core requirement of upgrading a site from drupal 6 to 7 - where the D6 site was using the content profile module and the D7 site needed Profile 2.

Both needed to register taxonomy terms (content taxonomy) on a profile creation.

The good news for readers out there is that this functionality can be performed using views.

1. Create a new view of type - Users (important!)

2. In relationships - add User Profile, select type of profile and save

3. Go back to relationships and you will then see an option for your content taxonomy field from within that profile type - add it.

4. Add a contextual filter - Taxonomy from term ID - Provide a default value - Taxonomy term ID from URL and save

5. Add a field from your profile2 to test

6. go to your preiview and add your term id - eg 14 - Hey presto!

Hope this helps

yuriy.sychenko’s picture

it works №9, but does not work with the parent terms unfortunately :(subsidiaries terms do not appear in them :(

vensires’s picture

The solution you need is Taxonomy Entity Index. We also needed parent terms and it worked.

freelylw’s picture

Issue summary: View changes

@vensires I have installed and done the index with the module " Taxonomy Entity Index ", after this, there is still no profile showing when I click on the taxonomy term.

Can you please suggest how should we use this module to display the profile2's profile when click on the terms. Thank you very much.

vensires’s picture

Unfortunately, I can't remember in which project I had used it and I also don't know what might have changed in this last year (since I wrote the comment above) in Profile2 or the Taxonomy Entity Index module. I don't think I will be a great help as a result...

zahra hosseini’s picture

i dont know my problem is related or not but in my project i created profile type A using profile2 module
this type has a field B that it is a taxonomy (vocabularies are : x,y,z)
now when i go to a specific user profile from type A for example a, value of taxonomy is x. when i clicked on x i want to see all persons who has same value for taxonomy (=x) but dont show any thing.
for solving it, i create a view(page) from profile type A and use contextual filter and relation ship and assume that taxonomy id is provided into url. so i get all users profiles that have same taxonomy id(this id is in url).