Copied to clipboard

Flag this post as spam?

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


  • radmanmm 117 posts 108 karma points
    Aug 20, 2012 @ 15:31
    radmanmm
    0

    media item not rendering on new macro calls

    Hello All,

    I am having an issue with rendering media items newly added to the media section.  Below is the macro I am using.  It has worked for several months now without issue, I don't think the macro is the problem, but am including it for completeness.  This site was freshly copied to a new server including the database which is running on SQL Express.  If I pass one of the existing media items (existing prior to site move) I can see it render properly with the umbracoFile path in the html as I would expect.  If I point to any files that were added after the move, the html shows empty for the file paths of those media items.  I have verified that the media ID values are successfully being passed into the macro.

    Any help would be appreciated, thank you.

    Macro code

    ----------------

    @using umbraco.MacroEngines
    @{
      var description @Parameter.description;
      var marketingContentID @Parameter.marketingContent;
      var thumbnailImageID @Parameter.thumbnailImage;
      
      dynamic marketingContent Library.MediaById(marketingContentID);
      dynamic thumbnailImage Library.MediaById(thumbnailImageID);
    }

    <div class="box"><href="@marketingContent.umbracoFile"><img src="@thumbnailImage.umbracoFile" alt="" /></a><br />
    <h2>Description</h2>
    @Html.Raw(description.Replace("\r\n"," "))
    </div>

     

  • radmanmm 117 posts 108 karma points
    Aug 20, 2012 @ 16:59
    radmanmm
    0

    tried to delete this post, but cannot, please ignore.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies