Univention Bugzilla – Bug 41802
Unknown object class prevents modifying user
Last modified: 2017-08-04 16:12:52 CEST
We received the following traceback: Version: 4.1-2 errata209 (Vahr) Die Ausführung des Kommandos udm/put users/user ist fehlgeschlagen: Traceback (most recent call last): File "%PY2.7%/notifier/threads.py", line 82, in _run tmp = self._function() File "%PY2.7%/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 402, in _thread module.modify(properties) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 85, in _decorated return method(*args, **kwargs) File "%PY2.7%/univention/management/console/ldap.py", line 135, in _decorated result = func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 441, in modify obj.modify() File "%PY2.7%/univention/admin/handlers/users/user.py", line 1517, in modify return super(object, self).modify(*args, **kwargs) File "%PY2.7%/univention/admin/handlers/__init__.py", line 307, in modify return self._modify(modify_childs,ignore_license=ignore_license) File "%PY2.7%/univention/admin/handlers/__init__.py", line 770, in _modify ml = self._ldap_object_classes(ml) File "%PY2.7%/univention/admin/handlers/__init__.py", line 832, in _ldap_object_classes ocs = set(schema.get_obj(ldap.schema.models.ObjectClass, x).names[0] for x in ocs) File "%PY2.7%/univention/admin/handlers/__init__.py", line 832, in <genexpr> ocs = set(schema.get_obj(ldap.schema.models.ObjectClass, x).names[0] for x in ocs) AttributeError: 'NoneType' object has no attribute 'names'
Reported again, 4.1-2 errata220 (Vahr)
Reported again, 4.1-3 errata282 (Vahr)
Reported again, 4.1-3 errata292 (Vahr) It was always reported by the same UUID.
Stumbled over it. Set the "LDAP object class" of an extended attribute to a non-existing class name. Arguably a user error and will hardly happen in non-dev environments. Still, the error message is a bit vague, the extended attribute is invalid, but you can save it. Introduced with Bug#41207?
(In reply to Dirk Wiesenthal from comment #4) > Stumbled over it. Set the "LDAP object class" of an extended attribute to a > non-existing class name. Thank you! :) > Arguably a user error and will hardly happen in non-dev environments. Still, > the error message is a bit vague, the extended attribute is invalid, but you > can save it. How should we handle this? A user friendly error message? Or ignoring the object class and print a warning to the logfile? > Introduced with Bug#41207? I don't think so. Well, yes now there is a traceback while prior would have been a simple error message: "LDAP Error: Unknown object class: foo".
Reported again, 4.1-4 errata353 (Vahr)
Created attachment 8334 [details] patch The patch restores the previous behavior. Instead of a traceback is shown the error message "The LDAP object could not be saved: LDAP Error Undefined attribute type: foobar: attribute type undefined" is shown.
It seems the univentionFreeAttributes[1-10] attributes are sometimes entered as object class when adding a extended attribute. This leads to this error. We should in that case print a human readable error message explaining the situation.
Version: 4.1-4 errata406 (Vahr) Remark: öffnen eines Bestehenden Users in der Benutzerverwaltungund speichern ohne änderung
(In reply to Florian Best from comment #7) > Created attachment 8334 [details] > patch > > The patch restores the previous behavior. Instead of a traceback is shown > the error message "The LDAP object could not be saved: LDAP Error Undefined > attribute type: foobar: attribute type undefined" is shown. Applied patch: r 80628 univention-directory-manager-modules (12.0.17-27) * Bug #41802: Applied patch from Folrian Best - Show error message instead of a traceback when saving an extended attribute with non-existing LDAP object class YAML: r 80636
OK: the error message is now more clear OK: YAML (adjusted in r80648)
<http://errata.software-univention.de/ucs/4.2/79.html>
Reported again, 4.2-0 errata29 (Lesum) Remark: Created a custom field as described here (http://docs.software-univention.de/manual-4.2.html#central:extendedattrs). Went to user page to add info to that field, and got the error message you see here. Please advise. Thank you.
Reported again, 4.1-4 errata439 (Vahr)