Forums / Developer / Alias exists, but image file gone - how to regenerate?
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