Forums / Setup & design / Problems showing image in ez 4 alpha 1

Problems showing image in ez 4 alpha 1

Author Message

Ovanes Markarian

Saturday 20 October 2007 10:05:48 am

Hello,

I am pretty new to ezPublish. Just got the alpha 1 release which works with PHP 5. Setup etc went fine and I am even able to publish content.

Created my first article. Opened it in the admin interface uploaded an image to this article as a sub item of the article. Use the command in the template for the article to show an image:

{attribute_view_gui attribute=$node.object.data_map.thumbnail}

Nothing is shown. Even if I use a default template no image appear. Is it a bug in ez 4 alpha 1 or do I do smth wrong?

One more addition: Enabling the debug information produces the following warning:

Warning: eZTemplate:attribute_view_gui  	Oct 15 2007 00:19:46

None of the templates design:content/datatype/view/.tpl, design:content/datatype/view/.tpl could be found

I also let ezPublish print out properties of the image object.

using the property:
{$node.data_map.image.content.data_map.image.content.original.url}
prints me the correct image url.

I also tried to use the following gui command to show the image without luck

	{attribute_view_gui attribute=$node.data_map.image.content.data_map.image.content}

Ovanes Markarian

Sunday 21 October 2007 5:43:20 am

I also sometimes see the error in the debug output stating:

Warning: eZImageShellHandler::convert  	Oct 20 2007 19:59:39

Failed executing: ""C:\WINNT\system32\convert.exe" "-geometry" "600x600>" "var/kw_site/storage/images/article-name/kwdemo/230-2-eng-US/KWDemo.png" "PNG:var/kw_site/storage/images/article-name/kwdemo/230-2-eng-US/KWDemo_reference.png"", Error code: 4

My setup.ini has the following section:

[imagemagick_program]
unix_Executable=convert
unix_SearchPaths=/bin;/sbin;/usr/bin;/usr/sbin;/usr/local/bin;/usr/local/sbin
unix_ExcludePaths=
win32_Executable=convertim.exe;convert.exe
win32_SearchPaths=
win32_ExcludePaths=convert.exe@Program Files/ImageMagick-6.3.6-Q16

and I am a little confused why ezPublish tries to run the app from windows system directory.

Any help appreciated.

André R.

Monday 22 October 2007 12:14:55 am

Example from ezwebin:

            {if $node.data_map.image.has_content}
                <div class="attribute-image">
                    {attribute_view_gui attribute=$node.data_map.image image_class=medium}
                    {if $node.data_map.caption.has_content}
                    <div class="caption">
                        {attribute_view_gui attribute=$node.data_map.caption}
                    </div>
                    {/if}
                </div>
            {/if}

As for imagemagic, tak a look in override/image.ini and fix the values there.
On linux it should contain something like:

<?php /* #?ini charset="utf-8"?

[ImageMagick]
IsEnabled=true
ExecutablePath=/usr/bin
Executable=convert
*/ ?>

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom