Ok. I've successfully upgraded and just ironing out issues here and there.
One of them is this.
Back in 5.x when I printed out $node->field_logo[0]['view']
name of the field = logo
In html it would output this:
Now with the upgraded Imagefield/CCK and FileField the same command now outputs:
The problem is that it doesn't even print out the image of the logo! It only prints out some generic png.
What's happening here??? BTW Everything else is working correctly... no errors. Just a screwed up output.
Now I have to write this into the theme as a workaround:
print $node->field_logo[0]['data']['alt']" title="<?php print $node->field_logo[0]['data']['title'] " width="100" height="70" />But the problem is that the width and the height change with each logo. And Drupal used to take care of that by outputting the correct image dimensions.
Please Help?! thanks!
Comments
Comment #1
Marco Palmero commentedOoopps Maybe I should have put some "code" tags... haha this is the code I was talking about above...:
Back in 5.x when I printed out $node->field_logo[0]['view']
name of the field = logo
In html it would output this:
<img src="http://www.xxx.com/files/logo.jpg" alt="Logo" title="Logo" width="224" height="79" />Now with the upgraded Imagefield/CCK and FileField the same command now outputs:
<div class="filefield-file clear-block"><div class="filefield-icon field-icon-image-jpeg"><img class="field-icon-image-jpeg" alt="image/jpeg icon" src="http://xxx.com/modules/filefield/icons/protocons/16x16/mimetypes/image-x-generic.png" /></div><a href="http://xxx.com/files/logo.jpg" type="image/jpeg; length=4228">logo.jpg</a></div>Now I have to write this into the theme as a workaround:
<div class="field-item"><img src="/<?php print $node->field_logo[0]['filepath'] ?>" alt="<?php print $node->field_logo[0]['data']['alt']" title="<?php print $node->field_logo[0]['data']['title'] ?>" width="100" height="70" /></div>Thanks!
Comment #2
quicksketchSounds like your formatters were lost. You can visit admin/content/node-type/[type-name]/display and change the display option back to "Image" and it should make it work like it was previously.
Comment #3
Marco Palmero commentedSolved! It was on Generic file option and then I switched - it was back to normal!
thanks I actually learned something new today!
There's so many options now as Drupal grows and develops more - its so hard to keep up!
Comment #4
vm commented