Forums / Setup & design / Uploaded Image visible in Admin but not in User version

Uploaded Image visible in Admin but not in User version

Author Message

Ben Muller

Monday 08 December 2003 8:59:59 am

Hi,
I've got a variation on the problem of displaying images. I'm using the Article class without modification, and images I upload into an article appear in the Admin preview, but do not appear in end user site. I've taken the following steps:

1. verified that my image.ini settings are in order
[ConverterSettings]
UseConvert=true
UseGD=true

[Rules]
...etc

2. verified apache has sufficient permissions to add files to the var directory

3. walked through the image problem documentation looking for solutions to problems with similar symptoms

In the Admin page the source looks like:
<img src="/siteroot/var/sitename/storage/variations/image/p/h/p/phpsgDCJE_150x150_108.jpg" width="150" height="98" border="0" alt="" />

but the source in the end user site looks like:
<img src="/siteroot" width="" height="" border="0" alt="" />

I'm guessing this last clue should give the problem away. I've scoured the forums looking for a similar post, but haven't seen one. Thanks in advance! Ben

Ben Muller

Monday 08 December 2003 9:13:20 am

I also meant to mention that I've verified the code on my page. I've created an override template which includes this code:

{attribute_view_gui attribute=$node.object.data_map.title}
{attribute_view_gui attribute=$node.object.data_map.intro}
{attribute_view_gui attribute=$node.object.data_map.thumbnail}
{attribute_view_gui attribute=$node.object.data_map.body}

The override seems to be working, it's just not displaying the image.

Alex Jones

Monday 08 December 2003 9:23:17 am

Ben, could you also include the code you use in the thumbnail template ({attribute_view_gui attribute=$node.object.data_map.thumbnail})? This might help us track down the problem.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Ben Muller

Monday 08 December 2003 10:21:49 am

this code:
{attribute_view_gui attribute=$node.object.data_map.title}
{attribute_view_gui attribute=$node.object.data_map.intro}
{attribute_view_gui attribute=$node.object.data_map.thumbnail}
{attribute_view_gui attribute=$node.object.data_map.body}

is just about the entire template. There is other code in pagelayout.tpl that wraps around this content.

I'm just getting into coding with ez, but I understood this operator to display the content class object's attribute. Please correct me if my understanding is incorrect. This is based on the code in the demo site.

Ben Muller

Thursday 11 December 2003 9:20:49 am

I believe the problem was that I had problems with caching, so I applied someone's recommendation to change the

[FileSettings]
VarDir=var/"my design"

to

[FileSettings]
VarDir=var/

this messed up the photo storage. I changed it back to
[FileSettings]
VarDir=var/skanner

and my images appear now.

Thanks!