Univention Bugzilla – Bug 29231
udm/layout: AttributeError: 'NoneType' object has no attribute 'name'
Last modified: 2015-01-08 14:00:01 CET
Wenn man zwei UMC-Tabs geöffnet hat und in einem einen Benutzer im LDAP-Verzeichnis verschiebt und im anderen auf einen Benutzer in einer zuvor erstellten und nun veralteten Liste von Benutzern klickt um ihn zu bearbeiten, bekommt man keinen schönen Frontendfehler "Objekt konnte nicht gefunden werden", sondern einen hässlichen Traceback: Die Ausführung des Kommandos udm/layout ist fehlgeschlagen: Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 204, in execute func( request ) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py", line 717, in layout ret.append( module.get_layout( object_dn ) ) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line 538, in get_layout if self.name == mod.name and self.is_policy_module(): AttributeError: 'NoneType' object has no attribute 'name'
*** Bug 3064 has been marked as a duplicate of this bug. ***
*** Bug 24620 has been marked as a duplicate of this bug. ***
*** Bug 24742 has been marked as a duplicate of this bug. ***
We will not ship a UCS 3.1-2 release; the next UCS release will be UCS 3.2. As such, this bug is moved to the new target milestone.
@Drees: Could you have a look at this bug, please. This seems related to Bug 34246.
*** Bug 26977 has been marked as a duplicate of this bug. ***
Reported again.
If any DN cannot be related to a UDM module this error happens. Simply a "if mod is not None" fixes this. This is btw not reproducible with UCS 3.2 in UMC!?! In UCS 3.2 there is just a standby animation which will never end. I could reproduce this by using curl: curl -s --cookie "$COOKIEJAR" --cookie-jar "$COOKIEJAR" -H "Content-Type: application/json" -d '{"options":{"username":"'"Administrator"'","password":"'"$password"'"}}' "http://$host/umcp/auth" curl --cookie "$COOKIEJAR" --cookie-jar "$COOKIEJAR" -H "Content-Type: application/json" -d '{"options":[{"objectDN": "uid=something_not_existing,cn=users,dc=ucs,dc=dev", "objectType": "groups/group"}], "flavor":"users/user"}' "http://$host/umcp/command/udm/layout"
Oneliner in my working copy.
If no UDM module for the LDAP DN can be detected the function does not raise this exception anymore. Fix: svn r56417 Package: univention-management-console-module-udm (5.1.25-4) YAML: 2014-11-25-univention-management-console-module-udm.yaml Downgradeable to UCS 3.2-4: easy Reproduceable: Comment #8
Created attachment 6515 [details] blank ldap page instead of dialog
(In reply to Florian Best from comment #10) > If no UDM module for the LDAP DN can be detected the function does not raise > this exception anymore. That is true, there isn't a traceback anymore. But I would expect a dialog box that would please me to relead the view, because the object wasn't found or something like this. Instead I got a blank ldap page (see screenshot) which is quit confusing.
(In reply to Alexander Kramer from comment #12) > That is true, there isn't a traceback anymore. But I would expect a dialog > box that would please me to relead the view, because the object wasn't found > or something like this. Instead I got a blank ldap page (see screenshot) > which is quit confusing. Would it make sense to use the error handling from Bug 34246? There the page also gets closed upon error.
(In reply to Alexander Kläser from comment #13) > (In reply to Alexander Kramer from comment #12) > > That is true, there isn't a traceback anymore. But I would expect a dialog > > box that would please me to relead the view, because the object wasn't found > > or something like this. Instead I got a blank ldap page (see screenshot) > > which is quit confusing. > > Would it make sense to use the error handling from Bug 34246? There the page > also gets closed upon error. absolutely! I'll add it as comment there.
Created attachment 6519 [details] german error message missing dot and space
I think we have to adapt the german error message. The first sentence should end with an fullstop / dot as the english version. And as you can see a whitespace is missing between 'ihre Suchergebnisse' Maybe you did not see it inside the po-file cause of a newline. Except from this minor things it looks and works great.
translation has been fixed (r 56656)
OK - translation looks good
http://errata.univention.de/ucs/4.0/18.html