We have moved to GitHub Issues
Created by Joanna Zhang 07 Feb 2018, 18:10:46 Updated by Heather L Floyd 18 May 2018, 03:02:49
Relates to: U4-10947
Relates to: U4-11348
Update: A summary of the issue and fix is listed below http://issues.umbraco.org/issue/U4-10944#comment=67-44527
What did you do?
Initially, I hit save on my current Umbraco Cloud project, and realised that the date fields in my nested content have disappeared, when looking at the network log, it seems like the date is not even sent.
I was not too sure if this problem was localised to my Umbraco Cloud project, so I spun up a new Visual Studio project and installed Umbraco via Nuget (7.7.10) and did the same thing. However, the same bug still happened.
I also tested saving a date field that is not in a nested content and that seems to save fine, so it seems to be a problem related to nested content and the date picker itself.
What did you expect to happen?
The date to be set and saved correctly.
What actually happened?
The date field does not save a value at all.
Impact This is currently causing issues on a production site for us.
I can repro, this was not a problem in 7.7.9 but it is now in 7.7.10.
Also: a mandatory numeric field will now not validate correctly, no matter what value I put in there (this is not even in Nested Content, it's a normal property on a doctype).
Note: the values submitted to
UmbracoApi/Content/PostSave are correct.
The fix for this is the same as this: http://issues.umbraco.org/issue/U4-10947 , see my comments http://issues.umbraco.org/issue/U4-10947#comment=67-44511
This is indeed fixed in U4-10947.
The problem was caused by us to do type conversions from datatypes to the C# types of:
These types are not nullable by default. However, if we were trying to do these conversions multiple times (for example: if you are using Nested Content, it does it's own additional conversion for each value) we would try to convert a DateTime to a nullable DateTime, which fails, leaving us with the resulting valuue of null, which is what was stored in the database.
We have added additional unit tests for when we do future alterations to this code so that we'll know it fails before we release anything.
This also caused the following problems:
@sebastiaan I noticed above you said the values submitted to PostSave were correct, but that wasn't what we were seeing. See http://issues.umbraco.org/_persistent/networklog.png?file=64-6509&v=0&c=true&rw=724&rh=306&u=1518027046782 the date property is an empty string.
@clarkd I understand, this is probably because:
I'll do a quick test to confirm.
I can repro and luckily I can report back that the fixes we made actually fix this issue as well. :-)
Thanks for the sanity check @clarkd !
Awesome - thanks @sebastiaan and @Shandem!
Backwards Compatible: True
Affected versions: 7.7.10
Due in version: 7.7.11, 7.8.1