umco / umbraco-vorto

1:1 multilingual property editor wrapper for Umbraco
https://our.umbraco.org/projects/backoffice-extensions/vorto
MIT License
44 stars 42 forks source link

Recursive GetVortoValue -> NullReferenceException #99

Closed drangus closed 6 years ago

drangus commented 6 years ago

Following an upgrade from Vorto 1.5.3 to 1.6.0, calling GetVortoValue with the recursive parameter set true fails with a NullReferenceException (... at line 98 of IPublishedContentExtensions.cs)

Testing for a null value appears to address the issue:

        var prop = content.GetProperty(propertyAlias);
        if (prop != null)
        {...

Is this an appropriate workaround?

(Umbraco 7.5.11)

SitePointGmbH commented 6 years ago

A workaround would be great. Have a productive web running and this function is essentiell....

leekelleher commented 6 years ago

@drangus How are your dev skills? Would be great if you could make a pull-request! 😎 (Since you spotted the issue and have a workaround patch, you should get commit credit)

drangus commented 6 years ago

@leekelleher First attempt at a PR! Trust it meets requirements.

SitePointGmbH commented 6 years ago

Great Workarround. Fixed the problem with me. For those who don't want to download the vs-Project and compile it, here is the fixed dll: https://www.dropbox.com/s/2n9q8chrkrglgxr/Our.Umbraco.Vorto.dll?dl=0

leekelleher commented 6 years ago

Thanks @drangus!

Closing this ticket off, any discussion can be done on PR #100

jbreuer commented 6 years ago

Is this the same issue as this? https://github.com/umco/umbraco-vorto/issues/41 For now I downgraded back to Vorto 1.5.3.

tomvanenckevort commented 6 years ago

I've just run into the same issue when I upgraded a site from v7.5.14 to v7.11.1 and then also upgraded Vorto from v1.5.3 to v1.6.0. Downgrading it back to v1.5.3 fixes the issue for now.

tommyTanaka commented 5 years ago

Any news about this issue? Just upgraded to 1.6.0 and run into this error ....