Forums / Setup & design / Trouble displaying images in articles

Trouble displaying images in articles

Author Message

James Packham

Tuesday 25 November 2003 5:46:17 am

Hi I'm having a little trouble displaying images in articles.

The way I've approached it is to use 'find related objects', then copy and paste the object id into the article. At first when I did this the image was displayed using the embed.tpl template, which caused it to be displayed as a link.

So then I tried overriding the image class with the template imageobject.tpl, which worked in as far as it used the new template but the images weren't displayed. Instead the little missing/cuorrupt icon displayed.

However when I open the picture (the uploaded ez version) a web browser it displays no problem. When trying other templates as the override they all seem to think that the image is corrupt, as the best I can get is the alternative bits of text and captions attached to the image.

When I turn on debugging I get the following, which I think might have something to do with the problem:

Error: eZImageVariation Nov 25 2003 13:39:03

Undefined attribute 'contentobject_attribute_id, version, requestedwidth, requestedheight', cannot get

This is repeated 4 times (one for each image I guess), when I look at the eZImageVariation table I noticed that the entries for height and width were 0, but the rest had data in most occurances could this be the problem?

Regards,

James

Marco Zinn

Tuesday 25 November 2003 6:59:32 am

Hi,
the Error that you get is not crucial, i think. There are some quotes missing in the sources code, but that error should be there for every image, that you have and not effect the displaying.
The "0" in the eZImageVariation do not sound good.
Do you know, if the variations are created at all?
Edit one of your images in the admin site. Do you see a thumbnail image of it? If not, you have some problem with ImageMagick or GD and your templates probably are fine.

Marco
http://www.hyperroad-design.com