Problems with image preview in administration

Author Message

Alejandro Dominguez

Wednesday 16 February 2011 12:21:48 am

Hello folks,

I have created an eZ class where I can upload several images. When I create a new object in the administration and I upload a big image I get a huge preview which it's a problem for my users because they need to upload unless 4 images. Do you know if it's possible to resize this preview???

Nicolas Pastorino

Wednesday 16 February 2011 1:50:27 am

Hello Alejandro,

So you are saying your content class has 4 'image' attributes right ?

The large image appears in the modal window in the eZ Online Editor, right after having uploaded it ?

Let us know,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Alejandro Dominguez

Wednesday 16 February 2011 2:09:15 am

Hello Nicolas,

You are right. The large image appears only when I have uploaded a photo and If I edit the object I only see the title. is there any way to avoid the preview?

I attach an image to show you the problem http://img140.imageshack.us/f/dibujochr.png/

Thanks for your answers Nicolas :)

Nicolas Pastorino

Wednesday 16 February 2011 2:43:53 am

Hola de nuevo Alejandro,

What i would bet, from seeing the screenshot you provided, is that altering the

[ImageSettings]
DefaultEditAlias=<value>

in an override of content.ini will help you here. You may want to look for inline documentation about this directive, inside the default content.ini file (<ezroot>/settings/content.ini).

I could infer that from reading the following template, likely to be the one used in your case when editing the content object :

<ezroot>/design/standard/templates/content/datatype/edit/ezimage.tpl

Let us know how things go,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Alejandro Dominguez

Wednesday 16 February 2011 4:32:56 am

Hola Nicolas,

I tried your example but I got an error. I tried to rollback the changes because I lost the browse image button but I can't do it. I get this error "None of the templates design:content/datatype/edit/ezimage.tpl, design:content/datatype/edit/.tpl could be found" in debug mode

any ideas?

Sorry if I'm giving a lot of problems

Alejandro Dominguez

Wednesday 16 February 2011 4:53:55 am

I forgot to tell you that I tried to make an overrride of ezimage.tpl, and this is what I can't rollback.

Marko Žmak

Wednesday 16 February 2011 5:10:09 am

How did you create the override? Have you set it up to use another tpl via override.ini or have you just created content/datatype/edit/ezimage.tpl template in your design?

If the first is the case, try this:

  • go in the override.ini where you have set the override for ezimage.tpl and delete (or comment out) the entry that you have added
  • clear all the caches

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Nicolas Pastorino

Wednesday 16 February 2011 5:10:37 am

Have you only changed the DefaultEditAlias configuration directive ? If yes, what value have you put in it ?

Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Alejandro Dominguez

Wednesday 16 February 2011 5:52:13 am

@Marko Žmak I modify the override.ini but I forgot to clean the cache. Now it's working again. Thanks :D

@Nicolas Pastorino In my version without override if I have changed DefaultEditAlias to tiny or small but I still get the Large image when I insert it. is the override compulsory?

Thanks folks!!

Nicolas Pastorino

Thursday 17 February 2011 2:25:20 am

Hello Alejandro,

The template override is not necessary, simply modifying the configuration ( DefaultEditAlias ) should be enough (and clearing the caches).

Cheers !

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

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 18 2025 04:11:42
Script start
Timing: Jan 18 2025 04:11:42
Module start 'layout'
Timing: Jan 18 2025 04:11:42
Module start 'content'
Timing: Jan 18 2025 04:11:44
Module end 'content'
Timing: Jan 18 2025 04:11:44
Script end

Main resources:

Total runtime1.5740 sec
Peak memory usage4,096.0000 KB
Database Queries80

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 589.1641152.6406
Module start 'layout' 0.00610.0038 741.804739.4844
Module start 'content' 0.00991.5625 781.2891679.8750
Module end 'content' 1.57240.0015 1,461.164124.1250
Script end 1.5739  1,485.2891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2108160.0002
Check MTime0.00140.0899160.0001
Mysql Total
Database connection0.00080.050910.0008
Mysqli_queries1.482994.2145800.0185
Looping result0.00100.0613780.0000
Template Total1.535897.620.7679
Template load0.00200.127620.0010
Template processing1.533897.445720.7669
Template load and register function0.00010.007010.0001
states
state_id_array0.00110.070610.0011
state_identifier_array0.00150.095720.0008
Override
Cache load0.00190.1187600.0000
Sytem overhead
Fetch class attribute can translate value0.00060.035330.0002
Fetch class attribute name0.00110.0685130.0001
XML
Image XML parsing0.00180.116230.0006
class_abstraction
Instantiating content class attribute0.00010.0032200.0000
General
dbfile0.00130.0814300.0000
String conversion0.00000.000640.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
10content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
1content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 42
 Number of unique templates used: 10

Time used to render debug report: 0.0001 secs