Hi there!

First: this is a very nice and useful module.
I have a big taxonomy tree and selecting terms is very hard to handle.

My setup:

- Content Taxonomy 5.x-1.x-dev
- CCK 5.x-1.6-1
- already existing Taxonomy Vocabulary ( about 100 terms so far)

I started with the Hierarchical Select 2 beta 1 Version, but after installation and configuration, nothing happends.
I could configer the module on the vocabulary page, but the select box in the add node page doesn't change.
So i tried the last dev. version of 1.4 but this doesnt work either.
At least i installed the offical 1.4 version and it works!

After a while i found out that content typs with content taxonomy fields, don't show up the Hierarchical Select version.

My Problem is that i have at least 4 content taxonomy fields inside a node type and a lot of nodes already created.
If i delete the content taxonomy fields on every content type, the Hierarchical Select module would work, but i would lose all my
data and the possibility to theme the node taxonomy fields via phptemplate.

Is there a work around?

thx
Alex

Comments

Wim Leers’s picture

Assigned: Unassigned » Wim Leers
Priority: Normal » Critical

Thanks for the bug report. This means that I somehow broke content_taxonomy support in HS 2, while it *definitely* did work.

Could you please verify that the widget you are using for your content_taxonomy fields are "select" widgets?

alexkessler’s picture

I am using 3 content_taxonomy fields with 'select' widgets.
One of them should be the HS 2 supported ( Catergory taxonomy tree, 4 levels deep),
the others are only 1 level taxonomy trees (language, subtitle) select lists.
I also use some autocomplete content_taxonomy fields (artist, city, country etc.).

In my last Test (running HS 2) i created a new content type and added the content_taxonomy field ( in my case the field category).
Using add node shows up the content_taxonomy field as HS 2, with all features.
Now i added some 'pure' cck fields and they show up too.
But if i'm adding one more cck field which comes along with the content_taxonomy kills the HS 2 dynamic select list
and downgrades it to a 'normels' select widget. It doesent matter if it's a autoselect content taxonomy field or a content taxonomy select list widget.

For me it looks like that more than one content_taxonomy field in the edit node form, disables HS 2 and the HS 1 dev Version.

Wim Leers’s picture

Strange... that's the latest thing I'd expect to break. Will look into this.

drutube’s picture

I've been struggling with this as well.

I was getting this error

Illegal offset content_taxonomy_options.module

It referenced line 159 which is
$keys[$node_field['tids']] = $node_field['tids'];

warning: Illegal offset type in /home/projectc/public_html/[domainuser]/sites/all/modules/content_taxonomy/content_taxonomy_options.module on line 159.

I found a remarkably similar set of problems and tried to work through the issue with this thread.

http://drupal.org/node/121242

The only solution I found was to disable HS.

Once I did the entire setup went back to normal function. I wasn't going to submit a bug report till I could gather more precise info or at least record the steps. I did try just about everything one could try. I'll try again tomorrow.

Wim Leers’s picture

Status: Active » Fixed

Fixed now. Since HS now also supports multiple select, I've removed that restriction from Content Taxonomy as well. I will release beta 2 shortly. Please confirm that the problem is solved, I only did rudimentary testing.

alexkessler’s picture

Thanx for the fast response!

I set up two fresh sandbox installtions.
One with Drupal 5.3 (my production site version) and one with Drupal 5.5.
Both with the following modules:

CCK Version: 5.x-1.6-1
Hierarchical Select: Version: 5.x-2.0-beta2
Content Taxonomy Version: 5.x-1.x-dev
JQuery Update Version: 5.x-1.0
JQuery Interface Library Version: 5.x-1.0

I configured the page content type with:
- 1 Taxonomy field with HS2 enabled, Hierachy: Multiple, Multiple select, Required, 4 levels deep
HS Coniguration: Save term lineage, allow user choose from any level

- 1 Taxonomy field without HS2, autocomplete, Hierachy: Single, Free tagging, Required

HS2 dynamic select shows up in both Drupal installations, but when i select the terms, the following happend:

Bug1 (select boxes):
Level1: Only Level 1 Terms showing up - OK
Level2: All Terms from any depper levels showing up in the select list - same on level3 but without the level2 terms.

Bug2 (selection box) :
If a 4 level deep term is added the 'all selctions' box in the node edit form looks like this:
Level1 > Level4
Level1 > Level3 > Level4
Level1 > Level2 > Level3
Level1 > Level2 > Level3 > Level4
After submitting the node the terms appears correctly.

Both bugs look like a known content taxonomy problem.
The default content taxonomy release also shows every term in every cck field after publishing the node.
That means if you have eg. 4 content taxonomy fields in a content type, every term will show up 4 times in the submitted node. At the end you will have 12 terms (4x4).

There is a patch to fix this http://drupal.org/node/168702 which i am also using on my production site (patch applied manually + also removed hardcoded 'br' tag).

So, this patch fixes both above-named bugs bugs on my sandbox installations,
but not on my real production site which is more than strange.

I will look into it and post if i made any configuration mistake or if another module cause this.

In my opinion HS2 works fine.

Thanx Wim for patching!

alexkessler’s picture

Ok, i posted to early that everything is looking fine.
I just tried to fix aboved-mentioned taxonomy erros on my production site than i found out that it already works on the first content type, but only there.

I have to explain that i have none of the content types associated with any vocabularies.
So i first thought this is the mistake. But it wasn't.

Good. So i tried to reproduce the error on my sandbox installations (same setup like a post before) and after a while i figured out:

1. Associating the vocabularies to the content type result in double appearance of the fields,
but at least HS2 shows up ( I could see that on my prdouction site, because i themed the input forms with phptemplate).

2. No associating shows HS2 only on the first content type (in alphabetically order).

The worst thing is that only the second version works for my production site and also only on the first content type.

I could make a backup of my site and disable module after module or remove field after field to find out what else HS2 breaks, but that will take some while.

Maybe my explanation is good enough that you have any clue whats going wrong.

THX for the support!

Wim Leers’s picture

Please try to be more concise the next time. :)

And indeed, associating vocabularies with content types should be avoided if you're already using content_taxonomy fields. Were there any actual problems left? Your writing is very confusing...

alexkessler’s picture

Sorry that my writing is confusing (bad english?, too much coffee?).
I wanted to give you a step by step description what i already tried to isolate the error.
Thought it would help you - Probably it was to much text ;)

Summary:

The goal is to use HS2 with the same vocabulary on ten content typs.

I set up one Vocabulary with some terms, HS2 enabeld.
First content type shows HS2.
Second content typ only shows the default content taxonomy select list, not the HS2 dynamic select list.

The question is:
Can i use HS2 with the same vocabulary on different content typs?

Wim Leers’s picture

Your English isn't bad. There's just too much text. I don't want stories. I want facts. That makes issues a lot more manageable :) ;)

What you are asking, is more of a howto for content_taxonomy than for anything else. But here it goes:
1) Configure the HS settings for your vocabulary and enable the "enable HS for this vocabulary" checkbox.
2) Make sure NO content type is selected on the vocabulary settings form.
3) Save the vocabulary settings form.
4) Configure a content_taxonomy field to your liking, make it use the vocabulary you just configured HS for.
5) Assign the field to all content types you wish to use it on.

alexkessler’s picture

Sorry that i can't stop bother you, but Step 5 just doesn't work.

I can assign the field to every content type i want, but only the first content type will show a HS2 list.

I tried it on 2 different 'fesh' installtions on 2 Computers, checked it with different browsers.
Used firebug to find any error, but HS2 is just not there. It appears only on the first content type.

Can you do me a favor?
Can you add a test content type to your HS demo site and assign eg. your car vocabulary to it?

If it's working on your site (with beta2 / multiselect) it have to be my bad charisma that the module isn't working on my sites...

Wim Leers’s picture

Ok. Send me the login details for your site please.

pacophotog’s picture

Status: Fixed » Active

The "Illegal offset content_taxonomy_options.module at line 159" bug still crops up even using your patch so it's not fixed yet. On my end, I was to replicate the error by doing the following. If I set 'save lineage' while setting up the category, the problem occurs. If I set 'save deepest term only', then there is no problem and the result is saved fine. Since I currently do not need to save the lineage, then I'm fine. But I still wanted to bring this to your attention. I have set this issue to active again.

Wim Leers’s picture

Sort of reproduced. I had it at line 134 though.

I'm fairly sure this is due to the bugginess of content_taxonomy, but will look into it when I find the time.

ferrangil’s picture

I'm not sure if I have the same problem (which one is the problem in that thread?!?), but I have some kind of problem. Not sure if it's some of the options (save lineage, ...) but when I edit a node, the selected term (cck field) got resets (the previously selected value is removed...). I have another field, an autocomplete one, that works just fine (It keeps the value when you go to edit the node).
I'll keep looking for the problem...

alexkessler’s picture

Sorry, for the late reply.
I have only a local installation at the moment, but i tested HS without CT and it seems to work fine.
I agree that the errors are caused by content_taxonomy and not by HS2.

Wim Leers’s picture

Status: Active » Closed (fixed)

I'm afraid the problems mentioned in this topic are all 100% CT's cause. HS only alters the #type of CT widgets and adds some settings, so it really can't be the cause. Please report the issues in the CT issue queue.

If you're certain that HS is the cause, please start a new issue, since this one is pretty confusing. You *must* clarify why HS is to blame, and explain how to reproduce it.

Let's face it, CT isn't quite as clean, stable, and well-maintained as we'd hope it to be.

Wim Leers’s picture

najibx found the exact cause. See http://drupal.org/node/212398#comment-702520.

SocialNicheGuru’s picture

subscribing