Forums / Setup & design / Problems with image preview in administration

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

eZ debug

Timing: Jan 18 2025 01:11:20
Script start
Timing: Jan 18 2025 01:11:20
Module start 'content'
Timing: Jan 18 2025 01:11:21
Module end 'content'
Timing: Jan 18 2025 01:11:21
Script end

Main resources:

Total runtime1.4620 sec
Peak memory usage4,096.0000 KB
Database Queries217

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0084 587.8438180.8203
Module start 'content' 0.00841.2902 768.6641680.9688
Module end 'content' 1.29860.1633 1,449.6328348.4297
Script end 1.4619  1,798.0625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00500.3435210.0002
Check MTime0.00170.1136210.0001
Mysql Total
Database connection0.00120.080210.0012
Mysqli_queries1.345992.05532170.0062
Looping result0.00270.18312150.0000
Template Total1.422697.320.7113
Template load0.00240.163020.0012
Template processing1.420297.139920.7101
Template load and register function0.00010.006810.0001
states
state_id_array0.00230.156110.0023
state_identifier_array0.00090.063220.0005
Override
Cache load0.00220.1502600.0000
Sytem overhead
Fetch class attribute can translate value0.00180.121940.0004
Fetch class attribute name0.00350.2405130.0003
XML
Image XML parsing0.00190.131540.0005
class_abstraction
Instantiating content class attribute0.00010.0036200.0000
General
dbfile0.00340.2335410.0001
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 42
 Number of unique templates used: 10

Time used to render debug report: 0.0002 secs