Bug 40242

Summary: UDM: error messages in web server log about missing translation files
Product: UCS Reporter: Moritz Bunkus <m.bunkus>
Component: UDM (Generic)Assignee: Florian Best <best>
Status: CLOSED FIXED QA Contact: Daniel Tröder <troeder>
Severity: minor    
Priority: P5 CC: best, gohmann, walkenhorst
Version: UCS 4.1   
Target Milestone: UCS 4.1-0-errata   
Hardware: Other   
OS: Linux   
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):
Max CVSS v3 score:
Bug Depends on:    
Bug Blocks: 40564, 40907    
Attachments: patch

Description Moritz Bunkus 2015-12-14 10:06:12 CET
When logging in to the UDM with the language set to English the Apache error.log is spammed with error messages about translation files not being found:

[Mon Dec 14 10:01:06 2015] [error] [client 10.199.92.2] File does not exist: /var/www/univention-management-console/js_$20150912131759$/umc/modules/i18n/en, referer: https://master.mbu-test.intranet/univention-management-console/?lang=en-US

There's one such line for each UDM module the user has access to.

This is, of course, not critical as they're not required for use but it makes debugging of real problems harder if you have to manually filter out harmless messages. Additionally deciding that they're actually harmless requires the administrator to have programming knowledge and to understand how popular translation systems like GNU gettext work.

These files should simply not be requested if the language is set to English ("en").

A similar albeit less annoying (as it only occurs once) message is the following when loading the "ucs-overview" site:

[Mon Dec 14 10:00:48 2015] [error] [client 10.199.92.2] File does not exist: /var/www/ucs-overview/js/ucs/en.json, referer: https://master.mbu-test.intranet/ucs-overview/
Comment 1 Florian Best univentionstaff 2015-12-14 10:11:46 CET
Yes, this is really annoying when debugging an english session!

(In reply to Moritz Bunkus from comment #0)
> These files should simply not be requested if the language is set to English
> ("en").
Some files exists for the english language e.g. due to some branding. So it's better to provide just an empty file.
We would need to rebuild every package for this.
Comment 2 Florian Best univentionstaff 2015-12-15 17:26:18 CET
Created attachment 7376 [details]
patch

Attached is a patch which adds a internal apache rewrite rule to a empty file so that these errors doesn't show up anymore in the error.log.
Comment 3 Florian Best univentionstaff 2016-01-07 12:29:33 CET
Applied that patch.

univention-management-console-frontend.yaml:
r66624 | YAML Bug #40242

univention-management-console-frontend (5.0.63-9):
r66623 | Bug #40242: Deliver empty translation files instead of a 404 Not found error
Comment 4 Daniel Tröder univentionstaff 2016-01-29 13:28:09 CET
OK: Code
OK: advisory
OK: manual test:
# wget -q http://localhost/univention-management-console/js/umc/modules/i18n/en/nope.json -O -
{}

Leaving in state RESOLVED until it was decided if the overview page could also be modified that way:

[Fri Jan 29 13:19:54 2016] [error] [client 10.205.1.238] File does not exist: /var/www/ucs-overview/js/ucs/en.json, referer: https://10.200.3.35/ucs-overview/
Comment 5 Stefan Gohmann univentionstaff 2016-02-02 19:45:50 CET
(In reply to Daniel Tröder from comment #4)
> Leaving in state RESOLVED until it was decided if the overview page could
> also be modified that way:

Can you split it into a new bug? Like Moritz said, it is less annoying.
Comment 6 Daniel Tröder univentionstaff 2016-02-03 09:54:17 CET
Overview error split to Bug #40564. The rest is already verified.
Comment 7 Janek Walkenhorst univentionstaff 2016-02-04 14:06:20 CET
<http://errata.software-univention.de/ucs/4.1/88.html>