Bug 27037 - Absturz des UMC-Servers beim Aufruf des "Über UMC"-Dialogs
Absturz des UMC-Servers beim Aufruf des "Über UMC"-Dialogs
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 3.0-2
Assigned To: Florian Best
Alexander Kläser
: interim-2
: 26738 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-08 15:06 CEST by Alexander Kläser
Modified: 2012-07-20 15:25 CEST (History)
2 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): Internationalization
Max CVSS v3 score:


Attachments
about_umc.patch (1.84 KB, patch)
2012-06-22 09:56 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2012-05-08 15:06:11 CEST
Wird auf einem System mit nur englischer Locale der "About UMC"-Dialog aufgerufen, stürtzt der UMC-Server ab, da ein Locale-Fehler geworfen wird:

> Traceback (most recent call last):
>   File "/usr/sbin/univention-management-console-server", line 206, in <module>
>     umc_daemon.do_action()
>   File "/usr/lib/pymodules/python2.6/daemon/runner.py", line 186, in do_action
>     func(self)
>   File "/usr/lib/pymodules/python2.6/daemon/runner.py", line 131, in _start
>     self.app.run()
>   File "/usr/sbin/univention-management-console-server", line 191, in run
>     notifier.loop()
>   File "/usr/lib/pymodules/python2.6/notifier/nf_generic.py", line 284, in loop
>     step()
>   File "/usr/lib/pymodules/python2.6/notifier/nf_generic.py", line 271, in step
>     not __sockets[ cond ][ fd ]( sock_obj ):
>   File "/usr/lib/pymodules/python2.6/univention/management/console/protocol/server.py", line 143, in _receive
>     self._handle( state, msg )
>   File "/usr/lib/pymodules/python2.6/univention/management/console/protocol/server.py", line 205, in _handle
>     locale.setlocale( locale.LC_ALL, 'de_DE.UTF-8' )
>   File "/usr/lib/python2.6/locale.py", line 513, in setlocale
>     return _setlocale(category, locale)
> locale.Error: unsupported locale setting

An dieser Stelle liegt folgendes Problem vor, der Server versucht für den "info"-Aufruf das Datum lokalisiert zurückzugeben. Besser wäre an dieser Stelle, das Datum in einem Standardformat zurückzugeben und es über Dojo lokalisiert anzuzeigen.
Comment 1 Florian Best univentionstaff 2012-06-21 14:19:10 CEST
*** Bug 26738 has been marked as a duplicate of this bug. ***
Comment 2 Florian Best univentionstaff 2012-06-22 09:56:05 CEST
Created attachment 4468 [details]
about_umc.patch

Die lokalisierung wird nicht mehr im backend gemacht, dort wird lediglich der timestamp zurückgegeben. Dieser wird im frontend in der locate-form des Browsers dargestellt. Wenn dies zwangsweise ein deutsches Format haben soll muss das noch einmal angepasst werden.
Comment 3 Florian Best univentionstaff 2012-06-22 12:05:02 CEST
Patch übernommen.

univention-management-console-frontend (1.0.378-1) unstable; urgency=low
  * added max-width for tooltips (Bug #25822)
  * the localisation of ssl validaty date in the about page have been
        moved from backend to frontend (Bug #27037)
univention-management-console (4.0.264-1) unstable; urgency=low
  * the localisation of ssl validaty date in the about page have been
        moved from backend to frontend (Bug #27037)
Comment 4 Alexander Kläser univentionstaff 2012-06-22 12:30:28 CEST
Super! Ein kleiner Änderungsvorschlag noch:

  SSL_ValidityDate : new Date(info.ssl_validity_date).toLocaleDateString()

Ich glaube hier wäre es gut die Dojo-Lokalisierung zu verwenden, da wir mit dojo.locale arbeiten → dojo.date.locale.format ist das, glaube ich.
Comment 5 Florian Best univentionstaff 2012-06-22 15:02:38 CEST
(In reply to comment #4)
> Super! Ein kleiner Änderungsvorschlag noch:
> 
>   SSL_ValidityDate : new Date(info.ssl_validity_date).toLocaleDateString()
> 
> Ich glaube hier wäre es gut die Dojo-Lokalisierung zu verwenden, da wir mit
> dojo.locale arbeiten → dojo.date.locale.format ist das, glaube ich.
Ok

univention-management-console-frontend (1.0.380-1) unstable; urgency=low
 * using dojo.date.locale.format in about page (Bug #27037)
Comment 6 Alexander Kläser univentionstaff 2012-06-22 16:16:03 CEST
Vielleicht statt

  dojo.date.locale.format(new Date(...))

ohne die Zeit, also nur Datum, d.h. z.B.

  dojo.date.locale.format(new Date(...), { 
    fullYear: true, 
    timePattern: " ", 
    formatLength: "long" 
  })

?
Comment 7 Florian Best univentionstaff 2012-06-27 15:54:43 CEST
(In reply to comment #6)
> Vielleicht statt
> 
>   dojo.date.locale.format(new Date(...))
> ...
Ja

Paket baut gerade.

univention-management-console-frontend (1.0.383-1) unstable; urgency=low
 * using dojo.date.locale.format in about page (Bug #27037)
Comment 8 Alexander Kläser univentionstaff 2012-07-05 12:43:21 CEST
QA: Alles prima, funktioniert und Changelog-Eintrag vorhanden :) .
Comment 9 Stefan Gohmann univentionstaff 2012-07-20 15:25:18 CEST
UCS 3.0-2 has been released: 
  http://forum.univention.de/viewtopic.php?f=54&t=1905

If this error occurs again, please use "Clone This Bug".