Copied to clipboard

Flag this post as spam?

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


  • Chad 68 posts 133 karma points c-trib
    Jan 24, 2012 @ 09:29
    Chad
    0

    XSLT macro can't load media after referenced in Razor macro

    This is a weird one.

    Have just upgraded to Umbraco 4.7.1.1, and added some new features using the newer Razor macros. The site already has an existing set of XSLT based macros.

    If I call @myNode.Media("ImageName").UmbracoFile via Razor.. that works fine.

    If I then browse to another page which uses a different xslt macro (that references the _same_ media property) e.g.:

    umbraco.library:GetMedia($item/ImageName, 'false')/umbracoFile

    I'm hit with an "Can't convert to int32 error". $item/ImageName is _definitely_ not null in any of these instances. If I _restart_ the server, and reload the page, the images via XSLT load fine. If I hit a page with the Razor macro, and then refresh the XSLTpage, then they don't load.

    I guess there is an issue with something to do with caching the Razor methods are screwing up some internal cache, anyone come across this before? Note this only applies to getting Media. Any other properties that are referenced still work fine.

     

     

     

  • 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