Copied to clipboard

Flag this post as spam?

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


  • Fabian 68 posts 172 karma points
    Feb 15, 2017 @ 12:21
    Fabian
    0

    Vorto throwing the following error in umbraco backoffice - "Cannot read property 'hasOwnProperty' of undefined"

    I have an issue with vorto where in the umbraco backoffice it is throwing the following error: "Cannot read property 'hasOwnProperty' of undefined".

    I have done some debugging and found out that this is happening because in vorto.js sometimes the - "$scope.model.value" is just the following string - "Our.Umbraco.Vorto.Models.VortoValue" and not an object which vorto is expecting to work with which is something as follows:

    {
                values: {},
                dtdGuid: "00000000-0000-0000-0000-000000000000"
     }
    

    Now what I can't figure out is why and when this is happening, since I can't find a pattern. Can anyone let me know in which cases the - "$scope.model.value" is filled with - "Our.Umbraco.Vorto.Models.VortoValue"

    Thanks

  • Fabian 68 posts 172 karma points
    Feb 16, 2017 @ 10:26
    Fabian
    0

    Can anybody shed some light on this please?

    Thanks

  • Micha Somers 134 posts 597 karma points
    Feb 16, 2017 @ 12:55
    Micha Somers
    0

    Can you tell something about when this started to happen?

  • Fabian 68 posts 172 karma points
    Feb 19, 2017 @ 09:36
    Fabian
    0

    @Micha Somers I think this is happening when the content is added programatically. I am saying so because I have done some further testing and when I add content through the umbraco backoffice such error does not happen but when I add the same content programatically, (through umbraco's content service), it happens. Please note that when I am adding such content programatically I am not setting the vorto properties.

    I am not sure though if this is the pattern, because if I am not mistaken there are contents in the umbraco backoffice that have been added programatically and the vorto fields work correctly for them.

    Do you have any idea?

    Thanks

  • Micha Somers 134 posts 597 karma points
    Feb 19, 2017 @ 10:37
    Micha Somers
    0

    If you are not setting the Vorto properties programmatically, that might explain (although that does not explain why it would have worked for other contents added programmatically)

    For updating & adding new Vorto values (using Json), the following page might help: Update property extended from Vorto in code behind

    Please let us know if that helps!

  • Fabian 68 posts 172 karma points
    Feb 19, 2017 @ 12:13
    Fabian
    0

    @Micha Somers but when I am adding such mentioned content programatically I do not want to set the vorto properties, I just want them to be empty. Do I still need to initialize them or something? I don't know if this is the case because I haven't found anywhere documented that states so.

Please Sign in or register to post replies

Write your reply to:

Draft