Copied to clipboard

Flag this post as spam?

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


  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jan 08, 2011 @ 11:31
    Tim
    0

    User Control Images Vanish When Cached.......

    I'm having an odd problem with Macro caching. I have two fairly straightforward usercontrol macros, one is a list page, that hits a database, and pulls out a list of staff, and a headshot photo. The other is for the detail page, that hits a database, and displays the staff's details, and a larger photo. So far, so good.

    However, if I try and cache either Macro, the first time you hit the page, everything works perfectly as you'd expect. On the second hit (after it's been cached), the images disappear. Completely. If you look at the source code, the images are still there, but the src element has been completely removed from the img tag.

    The text is still set ok, but ALL of the images from the usercontrols are missing. At first I thought it might be because the images were being pulled in from another domain, but I tried changing the src to local images and I had the same problem.

    It only appears to affect images that have runat="server" on them. Static images cache fine.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jan 08, 2011 @ 13:05
    Dirk De Grave
    0

    Moved topic as it wasn't really a umb.dev forum bug...

     

    Cheers,

    /Dirk

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jan 09, 2011 @ 19:47
    Tim
    0

    OK, fair enough.

    It does seem to be exhibiting buggy behaviour though, I'm also getting an issue where the cached XSLT macros sometimes vanish completely from the page. As in the entire block of content that's cached just ceases to exist. If I refresh the page, it comes back. Its not consistent, but it looks like a possible bug in the caching to me.......

    And on the original issue, if I set the usercontrol macro to cache, and uncheck the two cache option checkboxes, I get the above error. If I check just the cache by page option (which is what I want), I get the error. If I check the cache personalized option (either on it's own or with the cache per page option), then the macro caching works correctly, and the images are displayed. If I get a chance I'll try and debug it agains a debug build of Umbraco and see if I can work out what's happening, but if anyone's come accross this before, I'd appreciate any pointers!

    :)

Please Sign in or register to post replies

Write your reply to:

Draft