Attempting to save an IContent instance using SaveAndPublishWithStatus I get.
Input string was not in a correct format
It looks like it's not parsing a number properly to me but everything should be ok. All the the values on my object are added as string values since I have no idea what types IContentBase.SetValue(string propertyAlias, object value); supports as the second parameter.
SaveAndPublishWithStatus failing.
v7.2.1
Attempting to save an
IContent
instance usingSaveAndPublishWithStatus
I get.It looks like it's not parsing a number properly to me but everything should be ok. All the the values on my object are added as string values since I have no idea what types
IContentBase.SetValue(string propertyAlias, object value);
supports as the second parameter.Stack trace containing the relevant parts.
Any Ideas?
What does your doctype look like? It must have a property, where the value is stored as an int? And then the value you are passing cannot be parsed?
Got it!
It's that old chestnut. Booleans as integers but not really cos they're string representations of those integers because reasons.
I feel like I'm playing Whack-a-Mole with craziness just now.
Ahh, yeah when storing data it's essential to be aware of how it will eventually be stored in the db.
I don't know if there is such a thing as value mappers when working with the IContent as there is with the IPublishedContent?
is working on a reply...