Copied to clipboard

Flag this post as spam?

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


  • Steve Morgan 1274 posts 4191 karma points c-trib
    Oct 06, 2015 @ 10:30
    Steve Morgan
    0

    DAMP on legacy Umbraco v 4.7.2 site - thumbnails go missing

    Hi,

    I'm looking at a charity site on v4.7.2 - It has DAMP powering the images. There is a listing page which works on first load. If you click onto one of the pictures it then loads a "details" page and shows a larger version of the page.

    When you then go back to the list page the thumbnail is missing (the URL is output blank).

    Has anyone seen this before? I've just updated DAMP to 2.8 as I read through a few posts and people had similar but not the same issue.

    The thumbnail image is still "there" in the media folder - thought there might be some cache clean up problem.

    <xsl:for-each select="$results">
        <xsl:sort select="@createDate" order="descending" />
        <xsl:if test="position() &gt;= $startMatch and position() &lt;= $endMatch and current()/image != ''">
          <li>
            <a href="{umbraco.library:NiceUrl(current()/@id)}">
              <xsl:variable name="media" select="umbraco.library:GetMedia(current()/image, 'false')" />
              <xsl:if test="$media/alternateText != ''">
                <xsl:attribute name="alt">
                  <xsl:value-of select="$media/alternateText"/>
                </xsl:attribute>
              </xsl:if>
              <img src="{$media//crop[@name = 'thumbnail']/@url}" width="160" height="134" />
              <span style="display:block; text-align:center;">
                <xsl:choose>
                  <xsl:when test="current()/title != ''">
                    <xsl:value-of select="current()/title"/>
                  </xsl:when>
                  <xsl:otherwise>
                    <xsl:value-of select="current()/@nodeName"/>
                  </xsl:otherwise>
                </xsl:choose>
              </span>
            </a>
          </li>
        </xsl:if>
      </xsl:for-each>
    

    Kind regards

    Steve

  • Steve Morgan 1274 posts 4191 karma points c-trib
    Oct 06, 2015 @ 17:15
    Steve Morgan
    0

    OK - I worked it out.

    For some reason the above code on the listing page is in XSLT... the "detail" page when you click through to an image was in Razor.

    I've seen posts on Razor in early versions of this causing issues. I've ripped the razor out and replaced it with an XSLT version and all is well.

Please Sign in or register to post replies

Write your reply to:

Draft