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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 06:39:21
Script start
Timing: Jan 31 2025 06:39:21
Module start 'layout'
Timing: Jan 31 2025 06:39:21
Module start 'content'
Timing: Jan 31 2025 06:39:22
Module end 'content'
Timing: Jan 31 2025 06:39:22
Script end

Main resources:

Total runtime1.1282 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0040 589.8516151.2266
Module start 'layout' 0.00400.0022 741.078136.6797
Module start 'content' 0.00621.1212 777.7578944.6563
Module end 'content' 1.12740.0008 1,722.414111.8281
Script end 1.1282  1,734.2422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00280.2447160.0002
Check MTime0.00120.1051160.0001
Mysql Total
Database connection0.00050.047110.0005
Mysqli_queries1.080495.7634570.0190
Looping result0.00040.0390550.0000
Template Total1.101697.620.5508
Template load0.00180.160320.0009
Template processing1.099897.484020.5499
Template load and register function0.00140.125710.0014
states
state_id_array0.00110.094210.0011
state_identifier_array0.00110.099020.0006
Override
Cache load0.00150.1323300.0000
Sytem overhead
Fetch class attribute can translate value0.00050.047720.0003
Fetch class attribute name0.00180.156340.0004
XML
Image XML parsing0.00060.053420.0003
class_abstraction
Instantiating content class attribute0.00000.000640.0000
General
dbfile0.00090.0795170.0001
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs