Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Eric 35 posts 55 karma points
    Oct 26, 2009 @ 10:13
    Eric
    0

    weird behavior of ImageGen

    Hi everybody,

    I' m encountering a weird behavior of ImageGen:

    I follow the instructions given in pdf v2.0.1 and it works. Well I mean it display the reduced image as it is supposed.

    I call it twice in my project: one from  a C# written custom control and once from an xslt.

    In the custom control, everything is fine: in the cached folder of media item, there is a reduced image and this is the one that is display every time a call to imagegen occurs.

    When it is called by xslt, the image displays, but every call to imagegen.ashx generate a new image in the cached folder. I have tried to set  the property nocache to false (which sould force it to use the cached folder) but everytime it just creates a new image in the cached folder with big impact on the server performances. This, when using the very last version of Firefox, leads to the page displaying some raw html preceeded by an error message of object not set to an instance of an object.

    I thought that it could be caused by a problem with xslt parsing of the parameters string so I placed the whole string in a CDATA section.

    The behavoir doesn't change. Every call to imagegen just generates a new image.

    Here is the code I have used in xslt (it is placed on a template called by the main template)

     

    <xsl:variable name="image"><xsl:text>/umbraco/ImageGen.ashx?image=</xsl:text><xsl:value-of select="$node/data[@alias='Vil_FotoProd']"/><![CDATA[&altimage=/media/56296/nondisponibile.png&width=130&height=190&pad=true&transparent=true&format=png&constrain=true&nocache=false]]></xsl:variable>

    The page where this code is used is: http://www.viliottishopping.it/viliotti/scarpe.aspx

    Does someone has experienced similar problem and maybe found a solution ?

  • Sander Houttekier 114 posts 163 karma points
    Oct 26, 2009 @ 10:27
    Sander Houttekier
    0

    I believe you encountered the caching bug that slipt into the 2.0.1 version of imagegen

    take a look at this article for a solution

    http://our.umbraco.org/projects/imagegen/imagegen-bugs/2982-%5BUPDATE%5D-Fix-to-caching-bug-in-201

  • Eric 35 posts 55 karma points
    Oct 26, 2009 @ 14:39
    Eric
    0

    Thanks a lot. This patch works fine. It's now OK.

Please Sign in or register to post replies

Write your reply to:

Draft