Bug 29231 - udm/layout: AttributeError: 'NoneType' object has no attribute 'name'
udm/layout: AttributeError: 'NoneType' object has no attribute 'name'
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Domain management (Generic)
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 4.0-0-errata
Assigned To: Drees Dormann
Alexander Kramer
:
: 3064 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-14 18:35 CET by Dirk Wiesenthal
Modified: 2015-01-08 14:00 CET (History)
5 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling, External feedback, Usability
Max CVSS v3 score:


Attachments
blank ldap page instead of dialog (36.51 KB, image/png)
2014-12-09 11:59 CET, Alexander Kramer
Details
german error message missing dot and space (26.70 KB, image/png)
2014-12-10 15:10 CET, Alexander Kramer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2012-11-14 18:35:47 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'
Comment 1 Stefan Gohmann univentionstaff 2013-04-04 07:34:45 CEST
*** Bug 3064 has been marked as a duplicate of this bug. ***
Comment 2 Stefan Gohmann univentionstaff 2013-04-04 07:45:06 CEST
*** Bug 24620 has been marked as a duplicate of this bug. ***
Comment 3 Stefan Gohmann univentionstaff 2013-04-04 07:47:00 CEST
*** Bug 24742 has been marked as a duplicate of this bug. ***
Comment 4 Moritz Muehlenhoff univentionstaff 2013-05-31 10:45:05 CEST
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.
Comment 5 Alexander Kläser univentionstaff 2014-06-05 16:46:45 CEST
@Drees: Could you have a look at this bug, please. This seems related to Bug 34246.
Comment 6 Florian Best univentionstaff 2014-10-06 10:27:16 CEST
*** Bug 26977 has been marked as a duplicate of this bug. ***
Comment 7 Florian Best univentionstaff 2014-10-06 10:27:33 CEST
Reported again.
Comment 8 Florian Best univentionstaff 2014-12-02 16:24:19 CET
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"
Comment 9 Florian Best univentionstaff 2014-12-03 11:26:18 CET
Oneliner in my working copy.
Comment 10 Florian Best univentionstaff 2014-12-04 00:16:11 CET
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
Comment 11 Alexander Kramer univentionstaff 2014-12-09 11:59:43 CET
Created attachment 6515 [details]
blank ldap page instead of dialog
Comment 12 Alexander Kramer univentionstaff 2014-12-09 12:04:09 CET
(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.
Comment 13 Alexander Kläser univentionstaff 2014-12-10 11:13:02 CET
(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.
Comment 14 Florian Best univentionstaff 2014-12-10 11:25:11 CET
(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.
Comment 15 Alexander Kramer univentionstaff 2014-12-10 15:10:35 CET
Created attachment 6519 [details]
german error message missing dot and space
Comment 16 Alexander Kramer univentionstaff 2014-12-10 15:14:48 CET
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.
Comment 17 Drees Dormann univentionstaff 2014-12-10 15:52:21 CET
translation has been fixed 
(r 56656)
Comment 18 Alexander Kramer univentionstaff 2014-12-15 08:49:08 CET
OK - translation looks good
Comment 19 Janek Walkenhorst univentionstaff 2015-01-08 14:00:01 CET
http://errata.univention.de/ucs/4.0/18.html