In the admin page under “Users and groups > Groups”, when I click on the pencil o a group, the modal desn’t load anything. There is a message “the environment prevents the table from loading data” and the console shows some js errors.
If you have XWiki 12.2 then it should include both XWIKI-16906 (with this fix 6b902…8a847) and XWIKI-17121 (with this fix b8ce8…e8a18). The fact that you get this JavaScript error can mean that:
you upgraded recently the XWiki WAR from a version older then 12.0
but you didn’t upgraded the wiki pages properly, at least not XWiki.AdminGroupsSheet (maybe you had a merge conflict during the upgrade and you chose to keep the old version).
It might also be the case that you didn’t clear your browser cache, although that shouldn’t be needed anymore after an upgrade to a recent version of XWiki.
When importing a XAR you should always make sure to exclude the standard XWiki pages, otherwise you end up with wiki pages having code that doesn’t match the version of the XWiki WAR, like you did.