When using SXA 1.9 - 10.0.0 with Scriban templates under heavy load, a race condition might occur, resulting in pages being rendered incorrectly. Errors similar to the following can be found in the log records:
ERROR /Commerce Search Results/Default/Scriban(16,57) : error : Unexpected exception when calling sc_imagelink 220 220
Exception: Scriban.Syntax.ScriptRuntimeException
Message: /Commerce Search Results/Default/Scriban(16,57) : error : Unexpected exception when calling sc_imagelink 220 220
Source: Scriban
at Scriban.Runtime.GenericFunctionWrapper.Invoke(TemplateContext context, ScriptNode ...
ERROR /Minicart/Default/Scriban(13,20) : error : Unexpected exception when calling sc_field i_datasource Top Text Label Exception: Scriban.Syntax.ScriptRuntimeException Message: /Minicart/Default/Scriban(13,20) : error : Unexpected exception when calling sc_field i_datasource Top Text Label Source: Scriban at Scriban.Runtime.GenericFunctionWrapper.Invoke(TemplateContext context, ScriptNode callerContext, ScriptArray arguments, ScriptBlockStatement blockStatement) ...
To resolve the issue, download and install the hotfix compatible with the affected product version:
Be aware that hotfixes were built for specific SXA versions, and must not be installed on other SXA versions or in combination with other hotfixes. In case any other hotfixes have already been installed on a certain Sitecore XP/XC instance, send a request for a compatibility check to Sitecore Support.
Note that the ZIP file contents need to be extracted to locate installation instructions and related files inside. The hotfixes must be installed on a CM instance and then synced with other instances using standard development practices.