Copied to clipboard

Flag this post as spam?

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


  • James Kahler 36 posts 78 karma points
    Jul 25, 2012 @ 13:53
    James Kahler
    0

    razor macro and newly published nodes

    I have a few razor macros which are pulling content from different node types. For some reason newly published node are not picked up instantly. Generally they will be picked up intermintently. So you load the page and the data is there then you refresh and its gone again. This can go on for a few hours and then it sorts itself out.

    The umbraco.config is begin updated instantly with the data from the new nodes but when i do a Model.Descendants to retrieve the nodes it doesn't find them. It's like it doesn't think they are published. Caching is turned off on the macro.

    This instance of umbraco is running three sites, all are relativly small.

    Please someone help this is driving me mad!!

    i'm using umbraco version 4.7.2 

  • Jazz 21 posts 41 karma points
    Jul 26, 2012 @ 12:16
    Jazz
    0

    Hi James,

    I'm not sure if it help you. Try some thing like below in you scripts:

    var pagesToList = @Model.Children.OrderBy("UpdateDate desc");

  • James Kahler 36 posts 78 karma points
    Jul 26, 2012 @ 13:02
    James Kahler
    0

    i'm currently using this to retrieve the nodes 

    Model.Descendants("docType").Where("Visible").OrderBy("xxxxx")

    I'm using descendants because i have a deep folder structure.

    sometimes it will retrieve the new nodes and other times the new nodes are excluded for no reason.

    I've been playing about with this this morning, i've noticed that if i publish the node twice it sorts the problem out, very strange!

Please Sign in or register to post replies

Write your reply to:

Draft