Copied to clipboard

Flag this post as spam?

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


  • Jon 13 posts 71 karma points
    Mar 30, 2018 @ 20:24
    Jon
    0

    Terratype Field throws exception

    Hello I am using terratype and have installed the package and the providers(sometimes). Two issues one the providers seem to disappear, not a huge deal.

    The major issue is that when trying to access the value of the Terratype field it tells there is not field by that name.

    I use HasValue() HasProperty() and IsNull(), this all returned that the field is there and has a value but when I try to access it I get the expection.

        @if (item.HasProperty("EventLocation") && item.HasValue("EventLocation") && !item.IsNull("EventLocation"))
                {
                    <section class="col-md-6">
                        <h2>Location</h2>
                        @{var location = item.EventLocation } @*Exception here*@
    
                        @if (location != null)
                        {
                            <address>
                                @location.Lookup
                            </address>
                        }
                        @Html.Terratype((location as Terratype.Models.Model))
                    </section>
                }
    
  • Mila Pandurska 43 posts 190 karma points
    Apr 08, 2018 @ 22:27
    Mila Pandurska
    0

    Hi, Jon, I have the same issue from time to time. What I do is to clean my VS project and publish again. This fixes the error. I installed the package via Nuget over my VS project.

    Regards Mila

Please Sign in or register to post replies

Write your reply to:

Draft