Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
12.10.9, 12.10.10
-
None
-
Easy
-
N/A
-
N/A
-
Description
Hello,
We are trying to upgrade from XWiki 12.10.4 to 12.10.10
Unfortunately, we detected a brocker change for this piece of code was added in 12.10.9 which is a bit surprising for a patch version
[https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-12.10.9/xwiki-platform-core/xwiki-platform-web/src/main/webapp/resources/js/xwiki/xwiki.js
]
/** * Overwrite the fetch function in order to add our own response callback on all fetch requests made from this page. */ var interceptFetch = function() { var originalFetch = window.fetch; if (originalFetch) { window.fetch = function() { return originalFetch.apply(this, arguments).then(function(response) { handleResponseHeaders($.proxy(response.headers, 'get')); }); };
Our XWiki frontend is using fetch to reach our own XWiki API extension so all our UI that use fetch call are not displayed due to a javascript error.
It seems that your overrided version of fetch doesn't return the result and it seems impossible to chain calls like we do here
fetch("/rest/v1/identity/me").then(console.log)
or
fetch("rest/jobstatus/OurJobId").then(process...)
I noticed that you have been patch it in 13.4
return originalFetch.apply(this, arguments).then(function(response) { handleResponseHeaders($.proxy(response.headers, 'get')); return response;
So maybe it should be applied in a 12.10.11 and it would solve all our issues ?
If not possible we will try a major upgrade to 13.10.2 but it was not planed so far for now.
Thanks
Attachments
Issue Links
- relates to
-
XWIKI-18893 JSON error prevents the 'Edit' popover icon to be displayed in some cases
- Closed