Tag label issue in Content Types with more than one term-reference fields


Author Message
stavros

Posted: 11/15/2011
Quote message 

Hello all,

I got into an awful issue in a theme I create for Drupal 7.x.

In the content section of Artisteer, there is the ability to put an icon for the "tags" list of your content. So I setup a nice icon.

Now the logic for it behind the scenes is that Artisteer tries to find out the content type field of the node that has the "free tagging" type (taxonomy). Once it finds it, if it is not null it displays the terms after the "Tags" icon as normal.

However, I have a content type in Drupal where it has many fields which point to different taxonomy closed vocabularies.So there are many such "term-reference" fields for easier classification. I also have a free tagging field in the same content type. In Drupal fields display settings, I have configured the free tags to print last.

And here comes the problem.
If my content author creates a node and assigns free tags, then no problem...."Tags" label is followed by these free tags.
But if the user does not create free tags, then the last field of term-reference type (with non-null tag list) is printed instead !!

Instead of the "Tags" icon and list never showing up, they print the last field of type "term-reference" with a non-null list. And since there is always such an non-empty field.....I get the wrong result.

I looked at the code and is really complicated. I am trying to find out a way to not only search for field-type of term-reference but only with the suitabe field-name.

Has anyone else had that problem before???
 
stavros

Posted: 11/16/2011
Quote message 

I have fixed the issue but it is not an Artisteer bug.
It is just a reasonable limitation.
So I am recording the fix here just for future reference.

The produced php function only assumes that you have got one content field of type "term-reference".

In case of more such fields, one has to manually enter another PHP check to isolate the specific field name he wants to be output next to the "Tags" icon.

The function that must be changed is inside common_methods.php and is named get_Drupal_terms_D7().

Stavros
 
Rochelle

Posted: 12/21/2011
Quote message 

Hi Stravos:

I'm having the same problem. I have nodes tagged with multiple vocabularies and only one vocab gets printed in the footer of the node. It looks really bad. Could you possibly share the code you wrote to solve this problem? thanks!
 
Stavros

Posted: 12/26/2011
Quote message 

Quote Rochelle:

Hi Stravos:

I'm having the same problem. I have nodes tagged with multiple vocabularies and only one vocab gets printed in the footer of the node. It looks really bad. Could you possibly share the code you wrote to solve this problem? thanks!


Can you please send me an email to skanarakis@gmail.com?

Thanks
Stavros