Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 21 of 21

Thread: Watermark problem

  1. #1
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Unhappy Watermark problem

    Hello,

    Everytime I enable watermark on the website, the zoom feature (to view larger images) no longer works (i.e. watermark.enabled = true)

    If watermark is disabled, the URL for the zoom image is for example:
    /images/product/large/1118.jpg

    Which is great, its the link to my large image

    However when I enable watermark, the URL for the zoom becomes something like:/wolthuis.aspx%3fproduuctid%3d1118%26size%3dlarge

    So it doesnt work as this is an invalid link.

    Does anyone know what could be causing this? Any help would be much appreciated.

  2. #2
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    That is an entirely valid link, however there are some bugs with the watermarking system. Have a look at this post to see if it helps.

    http://forums.aspdotnetstorefront.co...ad.php?t=23023
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  3. #3
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Default

    Hello,

    Thanks for your post however I dont think that link can really help me.

    The watermark is working for me, for icon and medium images its only when I click on medium images to view the large that it doesnt work - and I am not quite sure why

    Dont even know where to begin to look but I just thought that URL looked strange.

    I hope someone can direct me into the right direction...

  4. #4
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    If you just try to browse to the src of the large image, what error do you get? Is it a 404 error or some other error?
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  5. #5
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Default

    Hello,

    Actually when you click or double click on the image, it doesnt do anything. No window pops up like its supposed to.

    This is the src code:

    </script><div id="divProductPicZ1670" style="display:none"></div><div id="divProductPic1670"><A class="highslide" id="zoom" onclick="return hs.expand(this, {captionId: 'caption1', showCredits: 'false', thumbnailId: 'zoom'})" href="wolthuis.aspx%3fproductid%3d1670%26size%3dla rge"><img border="0" id="ProductPic1670" name="ProductPic1670" style="cursor:hand;cursorointer;" alt="Click here to view larger image" src="wolthuis.aspx?productid=1670&size=medium" /></A></div><br/><img border="0" src="images/spacer.gif" width="1" height="4" /><br/><div align="center"><a onClick="return hs.expand(this, {captionId: 'caption1', showCredits: 'false'})" href="wolthuis.aspx%3fproductid%3d1670%26size%3dla rge"><img border="0" src="skins/skin_1/images/template/zoom.png" align="left" border="0" alt="Click here to view larger image"></a><DIV class="highslide-caption" id="caption1">Product Name<A class="control" onclick="return hs.close(this)" href="#">Close</A></DIV></div><br/></div></div><div class="detailContainerRight">

    Any ideas??

  6. #6
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    I don't know what your root site is but try browsing to [rootsite]/wolthuis.aspx?productid=1670&size=large and let me know what happens, what error you get.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  7. #7
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Default

    Hello again,

    I dont get any error - the correct image appears! Just dont know why it doesnt appear when I double click on the medium image though...have you seen this before?

  8. #8
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    I've seen a lot of strange things when it comes to watermarked images. In this case the problem is not the watermark engine, but in the link generator. Unfortunately it is difficult for me to compare to my site because I put in a simple lightbox effect for all my popups because I really hated extra windows popping up.

    If you turn of watermarking does the problem go away?
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  9. #9
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Default

    Hello,

    Fair enough

    Well yes if I turn off watermark everything works fine. This is why its very strange! But frustrating to say the least!!

  10. #10
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    What about this link?

    [rootsite]/wolthuis.aspx%3fproductid%3d1670%26size%3dlarge

    Does that work when watermarking is turn on?
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  11. #11
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Default

    Nope, this is the error:

    HTTP Error 404 - File or directory not found.

  12. #12
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Default

    It seems to not like it when all the % signs appear in the URL. Is there a way that i can tell it to link to the URL without them??

  13. #13
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    If you have the source code I would trace through it to the point where the link is inserted in the file and see what it is doing to replace all the ?, =, and & signs.

    If you need help finding that point let me know.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  14. #14
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Default

    I really appreciate your help thus far, but I dont have the source code...

  15. #15
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    If you don't have the source code there is nothing you can do to fix this problem. I would contact support and open a ticket with them. This is a problem in the source code at this point because it is only the source that will render that link.

    Honestly I strongly recommend getting the source. It doesn't cost that much and allows you to do lots of really nice things, like adding a lightbox effect. See my test site at http://wes-dev.wynright.com/ for an example.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  16. #16
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Default

    I always thought it would be something that could be ammended in the XML Package.

    You have a great site, am looking at it now!!

  17. #17
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    That is actually a limited site, the other one I have isn't visible without a login and that has many more features. There is so much you can do with this framework.

    With the XML you can change the look and feel, but I'm not sure you can change how the link is rendered. If you want, I can take a look at your XML package and see if there is anything I can see.

    ...Actually, when you said XML package that brought to mind a something. It probably is your package. Make sure that you have disable-output-escaping set to yet on the aspdnsf:LookupProductImage command.

    Code:
    <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFilenameOverride, SKU, 'medium', 0, $AltText)" disable-output-escaping="yes" />
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  18. #18
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Default

    This is the code I have in my XML package:

    <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFilenameOverride, SKU, 'medium', 1)" disable-output-escaping="yes"/>


    There seems to be a difference with 0, $AltText)" could this be the cause?

  19. #19
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    There are several instances of that LookupProductImage, are you sure all of them have their output-escaping disabled? Check the XML, perhaps even turn on XML debugging, to see exactly which command it outputting the offending line and then make sure output-escaping is disabled on it.

    It is coming back to me. I remember having this problem on a custom XML thing that I did once.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  20. #20
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Default

    Have done a complete search and every output escaping is set to yes. Ah, feel like we are so close yet so far!!

  21. #21
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    That last thing I can suggest is that you turn on debugging of the XML package and walk through it, little by little, and see which line is outputting the problem value and then we can look more closely at that.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM