Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Angus 7 posts 77 karma points
    Nov 14, 2017 @ 21:27
    Angus
    0

    Recursive GetVortoValue -> NullReferenceException

    Following an upgrade from Vorto 1.5.3 to 1.6.0, calling GetVortoValue with the recursive parameter set true fails with 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)

    A

  • Steve Borg 27 posts 98 karma points
    Nov 15, 2017 @ 14:41
    Steve Borg
    0

    I'm seeing a similar issue. My IUrlProvider/IContentFinder implementation stopped working and I have had to add HasVortoValue code prior to my GetVortoValue statement.

  • Angus 33 posts 126 karma points
    Nov 16, 2017 @ 16:27
    Angus
    0

    Hi Steve,

    In my case, a call to HasVortoValue with the recursive parameter set true evaluates true - as expected. However, the subsequent call to GetVortoValue with the recursive parameter set true 'fails' - it doesn't recurse and returns a null value. Testing for a null value in the DoInnerGetVortoValue method in IPublishedContentExtensions.cs as described above appears to fix my issue.

    A

Please Sign in or register to post replies

Write your reply to:

Draft