Copied to clipboard

Flag this post as spam?

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


  • Calle Bjernekull 16 posts 38 karma points
    Mar 26, 2014 @ 13:50
    Calle Bjernekull
    0

    Childcontent caching issues

    I experience some issues when listing properties from childnodes. Here's an example:

        IPublishedContent testroot = Umbraco.TypedContent(999);
        var somechildren = testroot.Children;
        foreach(IPublishedContent child in somechildren)
        {   
    string myVal = child.GetPropertyValue<string>("myproperty");
    //Do some stuff with myVal    
    }

    If I change the value of "myproperty"on some of the children, and publish that page. The old value still appears as "myVal". But, If I load every child again inside the loop, it works. Like this:

    IPublishedContent testroot = Umbraco.TypedContent(999);
    var somechildren = testroot.Children;
    foreach(IPublishedContent child in somechildren)
    {
    var child2 = Umbraco.TypedContent(child.Id);
    string myVal = child2.GetPropertyValue<string>("myproperty");
    }

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 26, 2014 @ 14:32
    Jan Skovgaard
    0

    Hi Calle

    What version of Umbraco are you using? It may or may not be a bug - but if you suspect that it is indeed a bug feel free to file an issue using the issue tracker.

    /Jan

  • 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