I've not tried this but I know Vorto returns null if the culture doesn't match, have you checked the culture on the rendering node matches the populated Vorto language?
Let me know if it all looks fine and I'll see if I can reproduce your issue to find out what's wrong.
I created my own value converter for the media picker, but in the GetPropertyValueType method the PropertyTypeAlias property on the propertyType object is null. Looks like Vorto creates a dummy propertytype which doesn't have that value. Might be related to why it also isn't working with the Umbraco Core Property Value Converters.
For now I found a nice workaround. Vorto and Nested Content work together pretty well. So you could create a Nested Content fieldset (min and max items both at 1) and create a Vorto datatype that has the Nested Content datatype inside.
Everything that goes through the Nested Content does work. So I added the image and other properties to Nested Content and now everything works. It even looks a bit nicer because all the properties are inside 1 Vorto property.
Problem with Multiple Media Picker inside Vorto and value converter
Hello Leopold, I tried to get the values out of a Vorto of Mutiple Media Picker by using
but the conversion seems to fail (returns null);
The only way I've found to get out my values was the old way,
and then using Umbraco.Media;
Do you have any clues about it? Thanks!
Hi Alessandro,
I've not tried this but I know Vorto returns null if the culture doesn't match, have you checked the culture on the rendering node matches the populated Vorto language?
Let me know if it all looks fine and I'll see if I can reproduce your issue to find out what's wrong.
Jeavon
Yes, I've also already tried to force Vorto by passing the culture by hand (as a string) but the issue is still the same
[edit]and by getting the int[] the result is correct, that's why I decided to post here instead of the Vorto forum :)
Thanks!
Hello,
have you been able to replicate the issue? thanks.
Hello,
I created my own value converter for the media picker, but in the GetPropertyValueType method the PropertyTypeAlias property on the propertyType object is null. Looks like Vorto creates a dummy propertytype which doesn't have that value. Might be related to why it also isn't working with the Umbraco Core Property Value Converters.
Jeroen
I think Vorto should be calling ConvertSourceToObject instead of ConvertDataToSource, that would probably be the issue...? https://github.com/mattbrailsford/Vorto/blob/master/Src/Our.Umbraco.Vorto/Extensions/IPublishedContentExtensions.cs#L149
Hmm yes it seems that is the problem. It should probably work the same as Archetype where it tries both methods: https://github.com/imulus/Archetype/blob/ec8df1d4659934e484eb368a610277cab73952d6/app/Umbraco/Umbraco.Archetype/Models/ArchetypePropertyModel.cs#L72-L84
Yes, could try both methods but I don't see why, it needs the object so use ConvertSourceToObject
For now I found a nice workaround. Vorto and Nested Content work together pretty well. So you could create a Nested Content fieldset (min and max items both at 1) and create a Vorto datatype that has the Nested Content datatype inside.
Everything that goes through the Nested Content does work. So I added the image and other properties to Nested Content and now everything works. It even looks a bit nicer because all the properties are inside 1 Vorto property.
Jeroen
Hi Jeroen,
By any chance do you have any example code showing how you mapped the Vorto value of that nested content to your properties?
Hello,
I've written a blog with example code: http://24days.in/umbraco/2015/multilingual-vorto-nested-content/
Jeroen
is working on a reply...