Alias exists, but image file gone - how to regenerate?

Author Message

Piotrek Karaƛ

Friday 11 December 2009 2:44:29 am

Hello,

I've got the following problem: an image alias has once been generated with attribute_view_gui template operator, but then the image alias file (jpg) has been removed for some reason from the file system. From that moment on, attribute_view_gui is unable to regenerate the file because the database tells it that the alias exists.

What would be the best/easiest way (in PHP) to force regeneration of the missing alias jpeg file?

I did some tests and is seems that it's enough to remove alias declaration that is stored in ezimage content object attributes in form of alias XML. However, the XML (eZImageAliasHandler I suppose) doesn't seem to provide any API for single alias removal (or even removeAllButNotOriginal ;) ). However, if I remove given alias XML node, the alias gets regenerated, as required.

Any ideas greatly appreciated!

Thanks,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

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 01:56:04
Script start
Timing: Jan 18 2025 01:56:04
Module start 'layout'
Timing: Jan 18 2025 01:56:04
Module start 'content'
Timing: Jan 18 2025 01:56:05
Module end 'content'
Timing: Jan 18 2025 01:56:05
Script end

Main resources:

Total runtime0.6268 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 589.1641152.6406
Module start 'layout' 0.00530.0026 741.804739.4922
Module start 'content' 0.00800.6176 781.2969469.7578
Module end 'content' 0.62550.0012 1,251.05478.1250
Script end 0.6268  1,259.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5359160.0002
Check MTime0.00140.2175160.0001
Mysql Total
Database connection0.00070.116010.0007
Mysqli_queries0.582692.9539460.0127
Looping result0.00050.0809440.0000
Template Total0.591594.420.2958
Template load0.00190.296720.0009
Template processing0.589794.074320.2948
Template load and register function0.00010.017110.0001
states
state_id_array0.00150.240610.0015
state_identifier_array0.00090.144420.0005
Override
Cache load0.00150.2466130.0001
Sytem overhead
Fetch class attribute can translate value0.00080.130010.0008
Fetch class attribute name0.00090.145020.0005
XML
Image XML parsing0.00060.089010.0006
class_abstraction
Instantiating content class attribute0.00000.000620.0000
General
dbfile0.00210.3395170.0001
String conversion0.00000.001340.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
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs