-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues when used inside LeBlender grid editor #63
Comments
Should it always return an json object with array of objects instead of a json array? |
I have extracted the json object from the json array.
I can cast this to Link object, but when I access the properties it fails.
|
I wonder if it is because the If I create my own model class like the following it does work.
Another way I could make it works is using the following:
But it would be great to ensure you can cast to value like:
or
|
This is the fix I ended up with for now to make it work inside LeBlender grid editor as a Single Url Picker (max items = 1).
|
It seems to be an issue in Nested Content as well.
Update: The issue with Nested Content was because I switched from LinkPicker (https://our.umbraco.org/projects/backoffice-extensions/link-picker/) to Single Url Picker (max items = 1). So I guess the property had an empty string value and the property value converter for Multi Url Picker didn't handle empty string? It was fixed after re-publishing the page. |
Here it has a null or empty check. But only a null check here. So I guess it then was because if create an instance of |
Thanks for the very detailed report(s). I'm not familiar with LeBlender, but I've just tried setting it up on a clean Umbraco 7.7.4 and LeBlender 1.0.8.2 and I cannot reproduce the problem using your code samples. For a new data type configured with max items 1, Regarding the exception when switching from LinkPicker to MultiUrlPicker is because I always store the data as an array and by looking at the source for LinkPicker it's stored as an object. The string null or empty and null checks should be fine since Umbraco always calls |
Okay, I am using LeBlender 1.0.8.4 and Umbraco 7.6.11 Do you have the core property value converters enabled? I have noticed some issues with some property editors inside LeBlender, when either using @Jeavon 's core property value converter or the core property value converters included in Umbraco 7.6+ Jeavon/Umbraco-Core-Property-Value-Converters#24 The issue regarding switching from LinkPicker to MultiUrlPicker might have been because the property value contained a whitespace or umbraco-multi-url-picker/src/RJP.MultiUrlPicker/Models/MultiUrls.cs Lines 22 to 27 in 3579a38
|
Yes, the value converters were enabled. I'll try to see if I can reproduce it with 7.6.11 I'll add some error handling if the data stored in the property is not what's expected. |
Hmm.. I still can't reproduce this with Umbraco 7.6.11, but as @Jeavon pointed out they are "sometimes" returning the source value which they shouldn't. Also I've noticed they don't call any of the So I'm pretty sure this is a problem with LeBlender and not MultiUrlPicker |
Hi @rasmusjp Yes, there might be some issue with LeBlender as @Jeavon mentions here Lecoati/LeBlender#80 However another similar issue I have, where Multi Url Picker not is used inside LeBlender editor but inside Nested Content. When deploying from local to live on Umbraco Cloud. Because of this it fails on frontpage on live enviroment in another partial, which use Multi Url Picker inside Nested Content. It seems to fails in |
Oh, can you please change this line to using
|
Okay, for the last issue I mentioned with Multi Url Picker inside Nested Content it seems to be fixed after upgrading Multi Url Picker to v2.1.0 Now I don't get the ysod although it fails deploying e.g. frontpage with a LeBlender grideditor with Nested Content. |
However I still have the issue with the cast inside LeBlender.
I am using Umbraco v7.6.11 and LeBlender v1.0.8.4, but it might be because of this issue: |
I have tried to use the multi url picker as a
link
property in a LeBlender grid editor.However I can't really make it work with cast to the strongly typed object.
I have tried with both a Multi Url Picker and Single Url Picker (max items = 1).
Inside LeBlender grid editor.
If I use LeBlenders
GetRawValue
method I get the raw json, but when I deserialize this to eitherIEnumerable<Link>
orLink
it returnsUnexpected character encountered while parsing value: l. Path '', line 0, position 0.
The raw json value looks like this:
If I re-use the variable from
GetRawValue
:then I get this error:
The text was updated successfully, but these errors were encountered: