Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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:
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"
Can anybody shed some light on this please?
Can you tell something about when this started to happen?
@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?
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!
@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.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted