If I tag a node to a private vocabulary term using the term reference field, all works as expected.

If I tag a node to a private vocabulary term using the private term reference field, that node does not appear on the taxonomy term page.

Comments

jfrederick’s picture

This provides insight to the above problem: when I create a View to show all nodes merely with the contextual filter Has taxonomy term ID, I get no results.

The contextual filter is joining the node table with the taxonomy_index table, which is not filled out for private taxonomy terms.

Sylense’s picture

I'm having the same problem

trobey’s picture

Assigned: Unassigned » trobey
Status: Active » Needs review

Excellent bug report. I traced the problem to the core taxonomy module testing for a field created by the core
taxonomy module so it was missing this private term reference field. The delete was working. So I reproduced the code and changed the test to private_taxonomy and it is working. Well, there was one additional tweak so that the code for the taxonomy fires to execute the delete first. I verified that the taxonomy_index table is getting updated but have done no additional checks. I have committed the code to the dev branch. Please test and make sure this solves the problem.

Sylense’s picture

Thanks for the commit. I'm still getting "There is currently no content classified with this term" so there must be something else missing not sure if the same is for the OP.

trobey’s picture

@Sylense: I committed a fix of a typo that might fix this. I have not been able to create this problem so please check and see if it works.

trobey’s picture

Status: Needs review » Closed (fixed)
melandren’s picture

Version: 7.x-1.2 » 7.x-1.3

I'm still having this issue. I've tried it with both the current release and the current dev version.

Content tagged with a private taxonomy term is not showing up on the term page.

Really want this to work. Terrific idea for a module.

melandren’s picture

Status: Closed (fixed) » Needs work
trobey’s picture

Status: Needs work » Postponed (maintainer needs more info)

I have a basic page content type where I added a private term reference with an autocomplete widget. When I create a node of this content type and tag it with a term it is showing up on the term page. Are you doing something different?

melandren’s picture

Aha... Yes... I was using the 'Select List' widget instead of autocomplete. I'm using it to allow users to choose which of their 'characters' they wish to post as... So it needs to be limited to their vocabulary that they've already created. Any clue why the select list widget might be causing trouble?

trobey’s picture

@melandren: The select list widget for the Private term reference field type has some settings. These are the number of values (maximum number of values users can enter for this field), the vocabulary (the private vocabulary which supplies options for this field) and users (the user whose terms are allowed to be used). The latter item has two options: All and Owner. All shows all terms regardless of the owner. Owner just shows the users own terms. I have considered whether there might be other useful options but for now these should satisfy many use cases. So, have you specified Owner for this third field setting?

a54’s picture

I also really would like this function to be implemented correctly, as I think it's a very powerful one.
My experience is that the select list is not causing the problem, as I'm using the autocomplete function but have the same problem. Perhaps also worth mentioning is that I use it with my own content type. Number of values is set to unlimited and users is set to Owner.
Generating a list of the taxonomy items per user works fine, but listing the items within a term via contextual filter doesn't.

trobey’s picture

I think I am missing something. I created a new content type with a Private term reference field using autocomplete. I created a node with a term. Then I created a view of content with a contextual filter on a term ID. When I use the term ID from above it displays the node I created.

trobey’s picture

Status: Postponed (maintainer needs more info) » Needs review

I noticed my fix was just in hook_node_update and I had neglected to add it to hook_node_insert. I have added it to hook_node_insert and committed the change to the dev branch.

muzich’s picture

Discovered the error, incorrect function is written in the file private_taxonomy.module line 1459, there is a typo taxonomy_build_node_index, but should be private_taxonomy_build_node_index. Thanks for the module of the International Association of Scientific and Practical Experts ANAPSI.

trobey’s picture

Um, thanks. But I already made this fix in the dev branch and I am asking for someone to review it.

melandren’s picture

Content is showing up on term pages for me. Works great. Views filters work as well.

trobey’s picture

Status: Needs review » Closed (fixed)