Bug 30822 - [Piwik] Errors with enabled Ghostery plugin in FF
[Piwik] Errors with enabled Ghostery plugin in FF
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 3.0
Other Linux
: P5 minor (vote)
: UCS 4.1-1-errata
Assigned To: Eduard Mai
Alexander Kläser
:
: 39182 (view as bug list)
Depends on:
Blocks: 40006
  Show dependency treegraph
 
Reported: 2013-03-19 11:33 CET by Alexander Kläser
Modified: 2016-04-13 14:57 CEST (History)
3 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):
Max CVSS v3 score:


Attachments
Exclude piwik errors from UMC dialogs (680 bytes, patch)
2015-12-04 18:41 CET, Eduard Mai
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2013-03-19 11:33:38 CET
With enabled Ghostery plugin, Piwik is blocked in FF. This results in some module not being loaded as the error that is triggered while loading piwik.js seems to confuse the normal module loading process. The error that Firefox throws is a script error.
Comment 1 Alexander Kläser univentionstaff 2015-10-12 14:03:22 CEST
*** Bug 39182 has been marked as a duplicate of this bug. ***
Comment 2 Alexander Kläser univentionstaff 2015-10-12 14:17:44 CEST
@Eduard: Could you have a look at this issue? Adding an dedicated handling of a module load error for piwik.js is probably the way to go (in app.js in package univention-management-console-frontend).
Comment 3 Eduard Mai univentionstaff 2015-12-04 18:41:06 CET
Created attachment 7348 [details]
Exclude piwik errors from UMC dialogs

The attached diff contains a change which excludes piwik errors from being shown in UMC dialog boxes.
Comment 4 Florian Best univentionstaff 2015-12-04 18:46:47 CET
Comment on attachment 7348 [details]
Exclude piwik errors from UMC dialogs

This looks good but might fail if the exception doesn't have attributes like info. Maybe better surround this by try-catch?:

>Index: management/univention-management-console-frontend/umc/app.js
>===================================================================
>--- management/univention-management-console-frontend/umc/app.js	(Revision 65939)
>+++ management/univention-management-console-frontend/umc/app.js	(Arbeitskopie)
>@@ -1210,7 +1210,7 @@
> 		_loadJavascriptModules: function(modules) {
> 			// register error handler
> 			require.on('error', function(err) {
>-				if (err.message == 'scriptError') {
var isPiwikModule = false;
try {
    isPiwikModule = err.info[0].split("/").pop(-1) == 'piwik.js';
} catch (err) {}
+				if (err.message == 'scriptError' && !isPiwikModule) {
> 					dialog.warn(_('Could not load module "%s".', err.info[0]));
> 					console.log('scriptError:', err);
> 				}
Comment 5 Alexander Kläser univentionstaff 2015-12-07 14:06:13 CET
(In reply to Florian Best from comment #4)
> Comment on attachment 7348 [details]
> Exclude piwik errors from UMC dialogs
> 
> This looks good but might fail if the exception doesn't have attributes like
> info. Maybe better surround this by try-catch?:

Good idea, however, "err.info[0]" is accessed via dialog.warn() anyway, so that it could eventually break there, as well.
Comment 6 Alexander Kläser univentionstaff 2016-03-18 11:00:33 CET
AFAIK, the error also pops up when starting a UCS appliance that has no internet access. Please check whether your patch also applies to this problem.
Comment 7 Eduard Mai univentionstaff 2016-03-21 18:14:32 CET
UCS-4.1-1:
r68224: Errors concerning Piwik are now suppressed.
r68225: yaml file.
Package: univention-management-console-frontend
Version: 5.0.63-30.1220.201603211732
Comment 8 Alexander Kläser univentionstaff 2016-04-06 12:43:47 CEST
Changes: OK
YAML file: OK

→ VERIFIED
Comment 9 Janek Walkenhorst univentionstaff 2016-04-13 14:57:08 CEST
<http://errata.software-univention.de/ucs/4.1/150.html>