Copied to clipboard

Flag this post as spam?

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

  • Lars Ljungqvist 14 posts 34 karma points
    Feb 18, 2013 @ 14:39
    Lars Ljungqvist

    Razor will only render old parts of Document type

    Hi. I have a funny problem. I extenced a Document type called "Medarbejder" (Employee) with some new properties.

    I am reading content from this Document type in razor and it works fine but I can't get the NEW properties that I put in the Document type. In the code below that means that the "@node.OrderNr.ToString()" "@node.formueBase" are not rendered. 

    Any help will be highly appreciated

    // Lars

    This is the simple code. A screendump of the document type is inserted below

    @inherits umbraco.MacroEngines.DynamicNodeContext
        // Get root node:
        var root = Model.AncestorOrSelf();

        // Get all descendants, filter by type:
        var nodes = root.Descendants("Medarbejder");
        // Loop through the filtered nodes, displaying the properties:
      <meta name="robots" content="noindex">
        @foreach (var node in nodes)
                <p>@node.Stilling og2 @node.ErSpecialist.ToString()<br />
       AND3 @node.OrderNr.ToString() AND4 @node.formueBase AND5 @node.Emaill</p>

  • Andreas Iseli 150 posts 427 karma points
    Feb 18, 2013 @ 15:42
    Andreas Iseli

    Hello Lars

    You must first publish the document(s) again, else the properties won't be available.


  • Sarah 40 posts 104 karma points
    Feb 18, 2013 @ 18:06

    I'm having the same problem as this and have posted about it. I have published the document again (many times!) but I'm still not seeing the property.

  • Lars Ljungqvist 14 posts 34 karma points
    Feb 19, 2013 @ 13:52
    Lars Ljungqvist

    Hi Andreas. Thank you for your answer. That sounds very reasonable but unfortunately it didn't help me. I am LOST. Strange enough I earlier added a field to my document type. Razor accepted it without any kind of troubles! Did you find a solution, Sarah?

  • Sarah 40 posts 104 karma points
    Feb 19, 2013 @ 15:47

    I did! Thanks to the help of a forum member. It seems my new property hadn't properly propagated down. See my answered post here

    I installed Rodion's package which if you right click content to republish entire site, gives you some extra options. I used the one to rebuild database cache and it worked perfectly for me. This issue must have been something specific to my local environment as I didn't have the same problem on my test or live environment. 

  • Lars Ljungqvist 14 posts 34 karma points
    Feb 20, 2013 @ 10:07
    Lars Ljungqvist

    Hi Sarah. Thank you for your answer and advice. I have installed the Rodion package and republished the entire site inlcuding a rebuild of the database cache. Still no reaction. My Umbraco version is 4.7.1. Do you know any other solution that could be tried out?

  • Sarah 40 posts 104 karma points
    Feb 20, 2013 @ 17:33

    I don't sorry Lars. Did you check the dbo.cmsContentXml table for the node you are having problems with to see if your new properties are appearing in the XML for the node in there? It is a very frustrating problem! 

Please Sign in or register to post replies

Write your reply to: