-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 10.2.7
-
Component/s: Apps - Analytics for Confluence
-
2
-
Severity 3 - Minor
-
11
Issue Summary
Non-admin users who are granted access to Analytics for Confluence see a blank Analytics page (page flashes then clears/resets). Admin users can view analytics normally.
Root cause is a JavaScript compatibility conflict between:
- Analytics for Confluence plugin: com.addonengine.analytics
- Assets - Confluence Macro plugin: com.riadalabs.confluence.plugins.insight-confluence v4.0.2
For non-admin users, the Assets web resource (ifc-web-resources) loads late and removes/corrupts d3.selection.prototype.watchTransition after NVD3 adds it, causing chart rendering to crash.
Steps to Reproduce
- Install Confluence Data Center (on-prem).
- Install/enable Analytics for Confluence (com.addonengine.analytics).
- Install/enable Assets - Confluence Macro (com.riadalabs.confluence.plugins.insight-confluence) v4.0.2.
- Create (or use) a non-admin user account.
- Add the non-admin user to the group that grants Analytics access in Confluence.
- Log in as the non-admin user and open the Analytics page (e.g., Space/Global Analytics view depending on configuration).
Expected Results
Non-admin users with Analytics permissions should be able to load the Analytics page and view charts/data normally (same behavior as admin users).
Actual Results
For non-admin users, the Analytics page:
- loads briefly (flash), then becomes blank / resets,
- while admin users continue to see Analytics normally.
Backend calls are successful (confanalytics REST APIs return 200 OK with valid payload), but the UI crashes during chart rendering.
(Observed in the browser console / bundled JS runtime error)
Uncaught TypeError: fe.watchTransition is not a function at batch.js:108:1303936
Additional console message observed before the crash:
The analytics client you provided doesn't support page events / track events
Cluster/UI behavior correlates with web-resource bundle ordering:
- Admin user bundle: Assets loads early → NVD3 adds watchTransition after → Analytics renders OK
- Non-admin bundle: NVD3 adds watchTransition → Analytics initializes → Assets loads late and removes it → next render crashes
Workaround
- Log in as Confluence Administrator
- Go to Admin → General Configuration → Custom HTML
- Scroll to "Body end" section
- Add the following code and click Save:
<script> (function patchD3WatchTransition() { // Re-add watchTransition after Assets plugin may have corrupted it function patch() { if (typeof d3 !== 'undefined' && d3.selection && !d3.selection.prototype.watchTransition) { d3.selection.prototype.watchTransition = function(renderWatch) { var args = [this].concat([].slice.call(arguments, 1)); return renderWatch.transition.apply(renderWatch, args); }; } } // Patch immediately and again after WRM finishes loading all resources patch(); if (typeof AJS !== 'undefined') { AJS.toInit(function() { patch(); setTimeout(patch, 500); setTimeout(patch, 2000); }); } })(); </script> - Clear browser cache and reload the Analytics page as a non-admin user
- If page still shows blank on first load, refresh once — the patch timing may need one cycle