Related to http://drupal.org/node/121660

I put two or more types (Action, Drama) in genere, when the node is displayed it shows Array, not the full list.

Comments

zis’s picture

Assigned: Unassigned » zis

I am unable to reproduce the bug.. it works fine on my install.. can you give more details about the error you're getting? and make sure you have the latest version..

tatxe’s picture

Yep, you're right. With the new version there's not this bug, but also I have a strange behaviour.

The Genre shows as tags at the top of the node but in the movie profile don' t show the genre. I'mean the code shows

if($node->genre) {

So, the code think theres no genre but it has (shows in the tags field). If I put this code on the php:

print_r($node->genre);
die();

And look for the genre array, shows:

Array ( [891] => stdClass Object ( [tid] => 891 [vid] => 21 [name] => Terror [description] => [weight] => 0 ) [898] => stdClass Object ( [tid] => 898 [vid] => 21 [name] => Miedo [description] => [weight] => 0 ) )

I don't know.. Maybe I'm doing something wrong :?

zis’s picture

Status: Active » Fixed

The genres are saved as taxonomy terms. The array you are getting is the typical drupal taxonomy array. So you're doing nothing wrong. There are many module to manage you taxonomy vocabs and control their display. You might want to check them out.

tatxe’s picture

Well, I've changed this line in mdb_theme.inc:

if($node->genre) {
foreach($terms as $term)
{

for:

$tlist="";
if($node->genre) {
foreach($node->genre as $term)
{

And I don't have any trouble... May I use contemplate for change some view things, but now it's ok.

zis’s picture

It was my mistake. my test copy was different than the cvs.. everything is now working in the cvs. Your code works.

Anonymous’s picture

Status: Fixed » Closed (fixed)