Closed (fixed)
Project:
Movie database
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
23 Feb 2007 at 13:11 UTC
Updated:
12 Mar 2007 at 19:31 UTC
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
Comment #1
zis commentedI 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..
Comment #2
tatxe commentedYep, 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 :?
Comment #3
zis commentedThe 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.
Comment #4
tatxe commentedWell, 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.
Comment #5
zis commentedIt was my mistake. my test copy was different than the cvs.. everything is now working in the cvs. Your code works.
Comment #6
(not verified) commented