STEPS TO REPRODUCE:
- Login with Admin or with an user
- Set 'Display hidden pages' to 'YES' from Profile > Preferences > Display Preferences
- Click on 'Templates' page from Navigation panel or from Page Index (/xwiki/bin/view/Templates/)
- Observe the console
The 'Templates' page is displayed without any errors.
The 'Template' page opens, followed by an error in console, having the following stacktrace:
The issue reproduces also on previous XWiki versions (tested down to 8.4.5).