Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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;
Layout = null;
var testItem = Model.Value<OEmbedItem>("embed");
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!
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.
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.
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. :(
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
@foreach (var item in Model.Value<IEnumerable<OEmbedItem>>("propalias"))
Thanks again for the package!
Version 4.1.0 is out. Thanks for reporting the issue and for testing the beta release.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted