-
Notifications
You must be signed in to change notification settings - Fork 42
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
Object reference not set to an instance of an object on empty Vorto #41
Comments
I can confirm the problem. |
@alecrt which line specifically are you referring to that has changed? |
Sorry @mattbrailsford didn't look at the source code still. The exception thrown is "The given key was not present in the dictionary" and happens when a specific culture is passed as cultureName parameter in DoInnerGetVortoValue method. So my guess is that something goes wrong here: var bestMatchCultureName = vortoModel.FindBestMatchCulture(cultureName); |
…VortoValue (relates to issue #41)
I've added some additional null checking to that area in DoInnerGetVorotValue (it should have actually been the same checks that occur in HasVortoValue but for some reason they were less restrictive) so hopefully this should fix it. There is a new release on the build server if you guys fancy giving it a try and letting me know if this fixes it for you? https://ci.appveyor.com/project/mattbrailsford/umbraco-vorto/build/1.5.1.36/artifacts Cheers Matt |
I have upgraded to Our.Umbraco.Vorto.1.5.1-alpha-000036.nupkg and now it's fixed. Thanks for the quick response. |
Awesome! Thanks for reporting the issue. |
Thanks! |
I just upgraded from Vorto 1.5.3 to 1.6.0 and I get the same error again. Is it possible this somehow got reverted in the latest version? |
I have downgraded back to Vorto 1.5.3 and the error is gone. Could this issue be reopened? |
I tried to upgrade the 1-1 multilingual example to Vorto 1.5.
When I have an empty value in Vorto I get an Object reference not set to an instance of an object.
The error happens with the following code:
var urlSegment = this.GetVortoValue<string>("urlSegment", culture);
https://github.com/jbreuer/1-1-multilingual-example/blob/master/Sources/Umbraco.Extensions/Models/UmbMaster.cs#L55
This is the stack trace:
Do you need any more info?
The text was updated successfully, but these errors were encountered: