Copied to clipboard

Flag this post as spam?

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


  • Alan Mitchell 57 posts 281 karma points c-trib
    Jul 19, 2019 @ 14:34
    Alan Mitchell
    0

    Property Value Converter always returning null on v8.1?

    Hi,

    Sorry if I'm asking something stupid, but I'm stuck on a basic implementation of this package, using v8.1 and Umbraco Cloud.

    I installed via nuget, followed the instructions to create a datatype, and added that as a property in a new document type.

    Created a simple test template as per instructions:

     @using ContentModels = Umbraco.Web.PublishedModels;
     @using Dawoe.OEmbedPickerPropertyEditor.Models;
     @inherits Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.Talk>
     @{
        Layout = null;
        var testItem = Model.Value<OEmbedItem>("embed");
     }
    
    <div>@testItem.EmbedCode</div>
    

    Created a content page, added an embed item (tried Vimeo and Soundcloud), Save and publish.

    When viewing this page it throws a Null reference exception - testItem is null.

    If I debug in VS, I can see that Model.Embed (the alias for the doctype property) contains a json string with all the embed data, so it's nearly there. I tried this again with multiple selection turned on, same result.

    Could it be related to the breaking change with Property Value Convertors in 8.1? https://our.umbraco.com/documentation/getting-started/setup/upgrading/version-specific#version-810

    Or am I missing some magic runes with Modelbuilder. I'm using PureLive models mode which works with other doctypes - though I don't know why Umbraco Cloud projects default to "Nothing"?

    This package does exactly what I need for our project, I hope you can help!

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jul 22, 2019 @ 07:32
    Dave Woestenborghs
    0

    Hi Alan,

    I logged this as an issue on the repository.

    I will see if I can get a fix released in the next couple of days.

    Dave

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jul 22, 2019 @ 08:17
    Dave Woestenborghs
    1

    Hi Alan,

    I have released v4.1-beta of the package.

    You can find links to the umbraco and nuget prerelease packages at : https://github.com/dawoe/OEmbed-Picker-Property-Editor

    Would be nice if you could test the beta before I make the final release.

    Dave

  • Alan Mitchell 57 posts 281 karma points c-trib
    Jul 22, 2019 @ 09:58
    Alan Mitchell
    0

    It works!

    Thanks for the speedy turnaround. It's a small fix but I think this breaking change in 8.1 might cause problems for a lot of packages. :(

  • Alan Mitchell 57 posts 281 karma points c-trib
    Jul 22, 2019 @ 10:02
    Alan Mitchell
    0

    One more tiny suggestion, there is a typo in the code in the readme.md file.

    In the usage section, the code sample for multiple embeds should be

    @using Dawoe.OEmbedPickerPropertyEditor.Models; @foreach (var item in Model.Value<IEnumerable<OEmbedItem>>("propalias")) { <div>@item.EmbedCode</div> }

    Thanks again for the package!

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jul 22, 2019 @ 10:20
    Dave Woestenborghs
    100

    Hi Alan,

    Version 4.1.0 is out. Thanks for reporting the issue and for testing the beta release.

    Dave

  • Hussein Khraibani 15 posts 98 karma points
    Jan 07, 2021 @ 12:10
    Hussein Khraibani
    0

    Hi Dave, I using your package with Umbraco 8.6 & doctype editor the grid editor convert property values into strings - I am getting a null exception if the user hasn't selected a vimeo link - I do have a null or empty string check in place. I have attached a screenshot as a reference. By the way I did raise an issue on github. Thank you for the package!enter image description here

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jan 07, 2021 @ 12:28
    Dave Woestenborghs
    0

    Hi Hussein,

    I still need to release a new version with this fix.

    For now you can download the beta release from github. That should solve your problem

Please Sign in or register to post replies

Write your reply to:

Draft