How to update image object with php?

Author Message

Vytautas Germanavičius

Thursday 02 November 2006 9:30:44 am

I try to update list of products with PHP.
I wrote extension to read info from CSV file, which add product to my EZ publish site, and updates info, if there are imported that product.
With text info i have no problems. But image even i overwrite original file, i update info in database, site shows old images, because import do not update resized version.

Has anyone idea, how to force EZ to create resized version of added image?

{set-block scope=root variable=cache_ttl}0{/set-block}

Claudia Kosny

Friday 03 November 2006 1:07:10 am

Hi Esu

Maybe you can try to delete them so the aliases are recreated the next time a template requests one. If you want to force recreation with the script have a look at the ezimagealiashandler.php, especially function imageAlias. Although this might take a while if you have lots of products.

Claudia

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 19:14:11
Script start
Timing: Jan 18 2025 19:14:11
Module start 'layout'
Timing: Jan 18 2025 19:14:11
Module start 'content'
Timing: Jan 18 2025 19:14:12
Module end 'content'
Timing: Jan 18 2025 19:14:12
Script end

Main resources:

Total runtime0.9593 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0115 587.9375152.6250
Module start 'layout' 0.01150.0053 740.562539.4453
Module start 'content' 0.01680.9412 780.0078519.1797
Module end 'content' 0.95790.0014 1,299.18758.1563
Script end 0.9593  1,307.3438 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4247160.0003
Check MTime0.00150.1533160.0001
Mysql Total
Database connection0.00090.092310.0009
Mysqli_queries0.909794.8234540.0168
Looping result0.00060.0624520.0000
Template Total0.915095.420.4575
Template load0.00210.215520.0010
Template processing0.912995.161620.4565
Template load and register function0.00010.009910.0001
states
state_id_array0.00170.178010.0017
state_identifier_array0.00130.133220.0006
Override
Cache load0.00170.1766120.0001
Sytem overhead
Fetch class attribute can translate value0.00070.072620.0003
Fetch class attribute name0.00130.132430.0004
XML
Image XML parsing0.00060.058520.0003
class_abstraction
Instantiating content class attribute0.00000.000830.0000
General
dbfile0.00190.2003160.0001
String conversion0.00000.001140.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs