Device Type Personalization after migration to Sitecore 10.3 XM
One peculiar issue came to us while migrating our application from Sitecore 9.3 XP to Sitecore 10.3 XM. We are using device type condition personalization in SC 9.3 XP, and the same was not working as expected in 10.3 XM.
This is basic personalization, and we considered it to work in 10.3 XM as well. But this personalization stops working as expected. We started to dig in, and we have figured out the root cause of this issue.
As we are migrating many tenants from SC 9.3 XP to 10.3 XM, we first migrate DBs from 9.3 XP to 10.3 XM by using the provided Sitecore DB script upgrades. We have successfully completed the DB migration and are now able to login to SC 10.3 XM CM.
So the thing is,? Sitecore XM 10.3 has a lot of changes to personalization-related features compared to XP vs. XM, and a couple of DLLs are removed in SC 10.3 XM. One of the DLLs is Sitecore.ContentTesting.dll, which is?not available for XM 10.3.
?The rules and logic that are defined for device type personalization were actually added to Sitecore.ContentTesting.dll for SC 9.3 XP, but the same rules are newly added to Sitecore.CES.DeviceDetection.Rules.dll?for SC 10.3 XM.
As we are upgrading our DBs from Sc 9.3 XP to 10.3 XM, a couple of rules elements are still with Sitecore. Content-testing references are in the below path.
/sitecore/system/Settings/Rules/Definitions/Elements/Device/Device Type
Another one, if you check Sitecore logs , you can see the below warnings
?WARN Could not load assembly in ReflectionUtil.CreateObject: C:\home\site\wwwroot\bin\Sitecore.ContentTesting.dll 6008 12:43:06 ERROR Assembly not found Sitecore.ContentTesting
So finally, what we did the following steps,
?
1.?????? Check the same path in vanilla SC 10.3 XM instance and compare between SC 9.3 XP and SC 10.3 XM and found old reference exist in our old migrated DBs.
2.?????? We replace with the below new assembly reference.
?
/sitecore/system/Settings/Rules/Definitions/Elements/Device/Device Type
?Sitecore.CES.DeviceDetection.Rules.Conditions.DeviceTypeCondition, Sitecore.CES.DeviceDetection.Rules
Now, device type-based personalization working as expected. :) :)