Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 7.1
-
Fix Version/s: 7.2-milestone-1
-
Component/s: Old Core
-
Labels:
-
Difficulty:Unknown
-
Documentation:N/A
-
Documentation in Release Notes:N/A
-
Similar issues:
Description
Currently, to determine if a custom displayer exists for a property, various places are checked (XWiki document in the current wiki, XWiki document in the main wiki and template file).
However, when determining if a template file exists to be used as a custom displayer, XWiki.evaluateTemplate(...) is used and the result is verified if it is empty.
With the addition of the TemplateManager (XWIKI-11252), we can now check if a template exists (TemplateManager#getTemplate(...)) without having to render it, so we can avoid a costly and possibly dangerous operation.