New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V8: True/False property value always seems to be false #6252
Comments
Sounds strange! @sulmbrant could you please add some steps to reproduce this? |
Nothing strange made.
|
I was able to reproduce this, but when I started to investigate the problem went away. I had no composition, just a true/false property directly on the document type. It wasn't saving a false value, it was creating no row at all in I'll see if I can work out how to consistently reproduce it. |
I don't think this is specific to Checkbox properties.
The Checkbox type does have the added problem that the default value doesn't apply to existing documents until the document is saved. Since there's no row in |
So, if I understand this correctly, this is the case when you edit your doctype and publish document with the newly added property on it? |
Or is this ONLY the case when you add a new property and do not republish the pages which contain the new property? |
There are two separate issues, I think. When you add a Checkbox property, existing pages will ignore the default value. They'll default to false until you save them, when the editor will respect the default value. This is fairly easy to change, though it has some side effects if the default value is ever changed. The second issue happens when you add any new property by opening the document type from a document (or maybe only when you also create a new data type for the new property). The new property won't be saved on the document that you already had open. The new property appears, but saving the page will send a blank value for the property. It looks like the model on the new property editor doesn't get properly wired up to the existing model for the rest of the form, but I'll admit it doesn't take much for me to get way out of my depth with angular. Reloading the page is enough to get things behaving again. |
I can confirm the second scenario: |
Looks like the described behavior in the initial issue can't be reproduced. The reproduction of the other issues is something that we are aware of and currently don't plan to work on. We are hoping to have a new system in place at some point were default values can be set on all datatypes where it makes sense. So for the reasons stated in the comments on related issue #8418 (comment) I will close this for now. |
When using the True/False property in Umbraco 8.1.3 the value seems to always be false no matter if you set it to true.
The text was updated successfully, but these errors were encountered: