I finally found the root cause of this issue and how to reproduce it. To reproduce this issue, you need to make your wiki fully private, i.e., check "Prevent unregistered users from viewing pages, regardless of the page rights". XWIKI-21811 is indeed the cause of this issue as it moves the JavaScript file into a webjar and it seems that inside the webjar handler, we have no context user/the context user is XWiki.XWikiGuest. |