Copied to clipboard

Flag this post as spam?

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


  • John Hodgkinson 613 posts 355 karma points
    May 09, 2014 @ 19:37
    John Hodgkinson
    0

    Umbraco 6.2 cannot access any of the standard Umbraco Fields

    data in the templates (I'm using MVC)...

    @Html.Raw("path = " + Umbraco.Field("path"))

    displays "path = "

    as a matter of fact, none of the standard Umbraco Fields are accessible now. ugh!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 09, 2014 @ 19:52
    Jan Skovgaard
    100

    Hi John

    I'm afraid it's a bug in the 6.2.0 release - Appears more people are having the issue since it's been reported here http://issues.umbraco.org/issue/U4-4851

    /Jan

  • John Hodgkinson 613 posts 355 karma points
    May 09, 2014 @ 19:56
    John Hodgkinson
    0

    wow - thank you Jan as always!

    at least I can now pass the altField value in the meantime. Much appreciated! Any idea when the next patch will be?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 09, 2014 @ 20:08
    Jan Skovgaard
    0

    Hi John

    I'm happy to help :)

    Unfortunately I have no idea when a patch release can be expected. But hopefully soon.

    /Jan

  • John Hodgkinson 613 posts 355 karma points
    May 09, 2014 @ 20:18
    John Hodgkinson
    1

    thanks Jan... below is a hack I'm throwing in our templates until a fix comes out (may not be a good example since I'm not using standard Umbraco fields but anyways):

                @{
                     @* umbraco field/alt-field hack *@ 
                     var primaryField = Convert.ToString(Umbraco.Field("pageHeader", "pageHeader"));
                     var altField = Convert.ToString(Umbraco.Field("navigationTitle", "navigationTitle"));
                     var outputData = !String.IsNullOrEmpty(primaryField) ? primaryField : altField;
    
                     @* output field data *@
                     @Html.Raw(String.Format("<h2 class=\"h2\">{0}</h2>", outputData));
    
                     @* <h2 class="h2">@Umbraco.Field("pageHeader", altFieldAlias: "navigationTitle")</h2> *@               
                 }
    
  • 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