Hi

When i select a vocabulary for content taxonomy, it is no longer visible under vocabularies in node edit form. I know it was working before but even when reverting to beta 6 it still does not work.

Is it the update to drupal 6.12 that is causing the problem?

I need this because i use a free vocabulary to enter terms, I save the page and then i can use content taxonomy with select boxes for the same vocabulary to choose which terms i want to show, make collapsed or hide.

My solution for now is to disable content taxonomy, add term to the page, enable content taxonomy and then select which terms i want to list.

Any easier solution?

Thanks

CommentFileSizeAuthor
#6 content_taxonomy_patch.diff3.41 KBoknate

Comments

Bilalx’s picture

Component: Option Widgets » Code

Found the culprit. It was _content_taxonomy_taxonomy_unset() function in content_taxonomy.module

Added a return in the first line but it would be nice if the "unsetting" was not automatic

edegro’s picture

I had the same issue, I commented this out in content_taxonomy_field():

        /*
        static $_content_taxonomy_array_cleared;
        if (!is_array($_content_taxonomy_array_cleared) || !$_content_taxonomy_array_cleared[$node->nid][$field['vid']]) {
          _content_taxonomy_taxonomy_unset($node->taxonomy, array($field['vid']));
          $_content_taxonomy_array_cleared[$node->nid][$field['vid']] = TRUE;
        }
        */

And commented the entire content_taxonomy_form_alter() function.

The TagTool stopped working when I installed Content Taxonomy. Its vocab specific settings kept getting wiped out. So far, since I made the above changes to Content Taxonomy, it hasn't been a problem again. Not going to say for sure, but I think there is a conflict there.

mh86’s picture

Status: Active » Closed (won't fix)

since some versions of content taxonomy, core taxonomy vocabulary fields get hidden as soon as a content taxonomy field with the same vocabulary id and content type exists. otherwise we might get some conflicts or we would need a different logic to remove core taxonomy fields.
it's difficult to make the behaviour suitable for every use case ;-)

tuffnatty’s picture

The correct logic is already described in the comment for content_taxonomy_form_alter():

/**
 * Implementation of hook_form_alter().
 *
 * hides the taxonomy form if there exists a content taxonomy field, which is set to 'hide default taxonomy fields'
 */

but the field option 'hide default taxonomy fields' is not implemented yet. Patches are welcome?

oknate’s picture

see comment below. Comment deleted.

oknate’s picture

Category: bug » feature
Status: Closed (won't fix) » Patch (to be ported)
StatusFileSize
new3.41 KB

I created a patch, based on the comments above. Seems to work fine. Allows you to have field without it removing vocabulary from taxonomy section of node form. It adds a checkbox to the field settings for this option.