Copied to clipboard

Flag this post as spam?

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


  • Patrick van Kemenade 101 posts 339 karma points
    Mar 15, 2021 @ 18:24
    Patrick van Kemenade
    0

    LiveAppModel working different then expected

    I made a change to a documenttype and since I wanted to have this change out while the rest of the release isn't ready, I wanted to just add 1 field to a documenttype. Fill a value in and display it on the front-end.

    Since I have LiveAppModel as datamodel I thought I could just do it on the fly and refresh my model and then be ready to use it immidiatly.

    Hower when I tried to add it i a partial view, it crashed

    @Model.AboutText
    

    But when I added it like this it did work:

    @Model.Value("AboutText")
    

    Is this normal behaviour ?

    Note the rest of the page are all strongly typed as @Model.FieldName it's only this new field in the DocumentType that I can't reference like this.

  • Amir Khan 1282 posts 2739 karma points
    Mar 15, 2021 @ 20:11
    Amir Khan
    0

    I think that should work. Maybe try Content > Republish entire site to see if rebuilding the cache helps?

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Mar 16, 2021 @ 00:21
    Alex Skrypnyk
    0

    Hi Patrick

    You need to use "PureLive" if you want to add properties on the fly.

    When you use "LiveAppData" you have to recompile models dll with visual studio.

    Here all possible Models'Builder settings - https://our.umbraco.com/documentation/reference/templating/modelsbuilder/configuration

    Thanks,

    Alex

  • Patrick van Kemenade 101 posts 339 karma points
    Mar 18, 2021 @ 18:09
    Patrick van Kemenade
    0

    According to the official documentmentation I think it should still work that's why I asked the question. Pretty sure it worked like this in the past with LiveAppModel. So probably a bug or it's behaviour has changed not sure.

Please Sign in or register to post replies

Write your reply to:

Draft