XML notifications are not rendered by the manager
Concerned version
Version: 2.0.7
Summary
- Configure notifications to use the XML format
- Chose any backend, such as "File"
- Add a XML notification for dwho
- Try to open it in the manager
-
⚠ The manager gets stuck on "Waiting for data" -
✅ Notifications are correctly displayed and marked as "done" by the portal
Logs
Browser console error:
SyntaxError: "JSON.parse: unexpected character at line 1 column 1 of the JSON data"
displayNotification notifications.min.js:1
Angular 6
Possibly unhandled rejection: {} angular.js:15570:15
Angular 8
AJAX request:
GET /manager.psgi/notifications/actives/dwho_DEF HTTP/1.1
Host: manager.example.com
AJAX response:
HTTP/1.1 200 OK
Server: nginx/1.10.3
Date: Wed, 05 Feb 2020 10:22:23 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
{"notifications":["<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root><notification uid=\"dwho\" date=\"2020-02-05\" reference=\"DEF\"><title>You have new authorizations</title>\n<subtitle>Application 1</subtitle>\n<text>You have been granted to access to appli-1</text>\n<check>I know that I can access to appli-1 </check>\n<check>I know that I can access to appli-2 </check></notification></root>\n"],"count":1,"result":1}
Possible fixes
It looks like the manager JS code does not expect XML