Univention Bugzilla – Bug 48092
Default values for properties are not saved
Last modified: 2019-03-10 16:33:56 CET
If I open the samba domain object in the LDAP directory browser, I always see the following notification:
> The following empty properties were set to default values in the form. These
> values will be applied when saving.
> General - Password - Passwords must meet complexity requirements: true
> General - Password - Store plaintext passwords: false
The LDAP object:
root@master431:~# univention-ldapsearch sambaDomainName=DEADLOCK43 -LLL
I think IN8-udm has the same problem.
It looks like this is an issue with complex/multiinput widgets and the _getInitialFormValues function in DetailPage.js.
At least in the IN8-udm package the problem was a dependency of a select widget on a multiinput widget which contained textboxes. A textbox doesn't have a ready function which resulted in the _getInitialFormValues function running to early.
My current workaround is a widget override on the text box with a ready function returning a promise which is fulfilled after a 1s timeout. Not nice, but it works for now.
(In reply to Jürn Brodersen from comment #1)
> My current workaround is a widget override on the text box with a ready
> function returning a promise which is fulfilled after a 1s timeout. Not
> nice, but it works for now.
Let's better fix this correctly as soon as possible.
1 second can easily happen with slow network connections e.g. on mobile devices.
Do you know which widgets are affected?
See also Bug #46529, which might is only a workaround for broken widgets.
The following is mostly a guess:
This seems to occur with widgets that depend on widgets without a ready function (e.g. TextBox.js). Normally a widget would get its value through DetailPage.js before _getInintialValue is called. But since the dependency mechanism fills out the value, this is not guaranteed to happen
In this case all values were supplied through the first udm get call without any additional umcp calls. So this does not need to be triggered through a slow network connection. But I think it might be as well if any umcp calls are involved.
I would like to see a fix for this, too. :)
But I think this is not trivial to fix.
The get/ call when receiving objects fill in default values into the form. But the form doesn't send all data so that only the difference / changed values are send back to the backend. Therefore for default attributes which are unset no changes are detected and not saved on modify() currently.
The cause is:
Date: Fri May 12 11:17:25 2017 +0000
Bug #41053: set default values of objects when receiving form values