ERROR Evaluation of condition failed. Rule item ID:
Unknown, condition item ID: {9A4BEB4B-4B0F-4392-A798-124CEC8AADA4}Exception: Sitecore.Framework.Conditions.PostconditionException
Message: Postcondition 'Tracker.Current.Session.Interaction should not be null' failed.at Sitecore.Framework.Conditions.EnsuresValidator`1.ThrowExceptionCore(String condition, String additionalMessage, ConstraintViolationType type)
Source: Sitecore.Framework.Conditions
at Sitecore.Framework.Conditions.Throw.ValueShouldNotBeNull[T](ConditionValidator`1 validator, String conditionDescription)
at Sitecore.Framework.Conditions.ValidatorExtensions.IsNotNull[T](ConditionValidator`1 validator)
at Sitecore.ContentTesting.Rules.Conditions.CountryCondition`1.Execute(T ruleContext)
at Sitecore.Rules.Conditions.WhenCondition`1.Evaluate(T ruleContext, RuleStack stack)
at Sitecore.Rules.Conditions.OrCondition`1.Evaluate(T ruleContext, RuleStack stack)
at Sitecore.Rules.Conditions.WhenRule`1.Execute(T ruleContext)
at Sitecore.Rules.Conditions.WhenCondition`1.Evaluate(T ruleContext, RuleStack stack)
at Sitecore.Rules.RuleList`1.Run(T ruleContext, Boolean stopOnFirstMatching, Int32& executedRulesCount)
{9A4BEB4B-4B0F-4392-A798-124CEC8AADA4}Moreover, the error's message hints are what ultimately causes the error to trigger:
Tracker.Current.Session.Interaction should not be null
/sitecore/system/Settings/Rules/Definitions/Elements/Predefined Rules/Predefined Rule
![]() |
| Nothing to see here... |
- visitor is located in the Asia Pacific region- visitor is located in the UK- or where visitor is equal to the United Kingdom- where visitor is located in Continental Europe
These are custom rules they've added that categorize a list of countries into a region they want to target.
where the country is equal to Australiaor where the country is equal to Brunei Darussalamor where the country is equal to Chinaor where the country is equal to Hong Kongor where the country is equal to Singaporeor where the country is equal to Taiwanor where the country is equal to Thailandor where the country is equal to New Zealandor where the country is equal to Qataror where the country is equal to Turkeyor where the country is equal to Malaysiaor where the country is equal to Russian Federationor where the country is equal to Indiaor where the country is equal to Indonesiaor where the country is equal to United Arab Emiratesor where the country is equal to Philippinesor where the country is equal to Israelor where the country is equal to Pakistanor where the country is equal to Saudi Arabiaor where the country is equal to Vietnamor where the country is equal to Japan
at Sitecore.ContentTesting.Rules.Conditions.CountryCondition`1.Execute(T ruleContext)
Condition.Ensures<CurrentInteraction>(Tracker.Current.Session.Interaction, "Tracker.Current.Session.Interaction").IsNotNull<CurrentInteraction>();
The reported behavior occurs because Sitecore.Rules.Conditions.WhenRule class inherits CanEvaluate() method from Sitecore.Rules.Conditions.RuleConditionclass which always returns true. That is why the rule is not skipped so the evaluation continues and leads to the exception.
In order to workaround the issue, please try to avoid the usage of Conditional renderings rules.
Please assign conditions to your renderings directly without wrapping them into conditional renderings rule.
In this case, Sitecore will trigger CanEvaluate method related to the specific condition, so the condition will be skipped.
- Decompiled the `Sitecore.ContentTesting.dll` and copied the Sitecore.ContentTesting.Rules.Conditions.CountryCondition class into our solution called `CountryConditionOverride`. I used Telerik JustDecompile for this.
- Commented the offending line (48) and replaced it with a simple null check that returns false.
- Enabled the custom override class by updating the `Type` field on the following default Sitecore item and published it:
/sitecore/system/Settings/Rules/Definitions/Elements/GeoIP/Country
{52E42C59-7210-43E5-94A6-3EA6B98835B8}
Field: Script (section) > Type
Old value: `Sitecore.ContentTesting.Rules.Conditions.CountryCondition,Sitecore.ContentTesting`
New value: `Foundation.Overrides.Rules.Conditions.CountryConditionOverride, Foundation.Overrides`































Last week, while we were all preoccupied with COVID-19, Sitecore did something nobody could have predicted.
Between the chaos, our beloved 












