Copied to clipboard

Flag this post as spam?

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


  • Mov3nforward 117 posts 319 karma points
    Sep 27, 2017 @ 02:56
    Mov3nforward
    0

    Leblender issues

    I have created a Leblender editor in the past for a client to place responsive images. The code used to work, but in version 7.6.6 I am getting an error "Object reference not set to an instance of an object." I don't understand why I am getting this error. Any guidance would be greatful.

    @inherits UmbracoViewPage<Lecoati.LeBlender.Extension.Models.LeBlenderModel>
    

    @{ Layout = "";

    var header = Model.Items.ElementAt(0);
    var image = String.IsNullOrEmpty(header.GetValue<string>("Image")) ? "#" : Umbraco.TypedMedia(header.GetValue<string>("Image")).Url;
    var link = Umbraco.Content( @Model.Items.ElementAt(0).GetValue("link") );
    

    }

    @if ( @link.Url == "" ) { @Html.Raw(Model.Items.ElementAt(0).GetValue("altText")) }

    else { @Html.Raw(Model.Items.ElementAt(0).GetValue("altText")) }

  • Keith R Hubbard 175 posts 403 karma points
    Sep 27, 2017 @ 05:37
    Keith R Hubbard
    0

    Did you overwrite the config files in an upgrade? or is this a new install? check your propertyvalueconverters setting in umbracosettings.config. of refactor code for the converters.

  • Mov3nforward 117 posts 319 karma points
    Sep 28, 2017 @ 01:12
    Mov3nforward
    0

    This is a new install with all of the new media pickers.

  • Keith R Hubbard 175 posts 403 karma points
    Sep 28, 2017 @ 04:20
    Keith R Hubbard
    0

    then you will have to refactor the code for the new property converters,

  • Mov3nforward 117 posts 319 karma points
    Sep 28, 2017 @ 04:49
    Mov3nforward
    0

    Yes, I get that, but there is no working documentation. The example in the current documentation for Leblender plugin does not work.

Please Sign in or register to post replies

Write your reply to:

Draft