Issues with Visitor Groups/Categories after upgrade to CMS 12

Vote:
 

After upgrading from CMS 11 to 12 I have some issues with Visitor Groups which seems related to a plugin for Categories. I have changed the plugin from Geta.EpiCategories (https://github.com/Geta/EpiCategories) to the dotnet 5+ alternative Geta.Optimizely.Categories (https://github.com/Geta/geta-optimizely-categories). When I start the CMS using dotnet run I get the following error in the console:

fail: EPiServer.Personalization.VisitorGroups.VisitorGroupRole[0] Unable load criterion of type 'Geta.EpiCategories.CategoryCriterion, Geta.EpiCategories'  System.IO.FileNotFoundException: Could not load file or assembly 'Geta.EpiCategories, Culture=neutral, PublicKeyToken=null'.

It seems that there are stuff from the old plugin still lingering. And, when I take a peek in the database I see references to it in various tables, e.g. “Geta.EpiCategories.CategoryCriterionSettings, Geta.EpiCategories, Version=1.2.11.0, Culture=neutral, PublicKeyToken=null” in tblBigTable.

I don’t know how to handle this. Should I perform some kind of manual database cleanup? Or, should something similar have been done for me automatically but has failed for some reason?

I don’t know if it is related, but when I make a dummy change to one of the existing Visitor Groups, I get a NullReferenceException from EPiServer.Cms.UI.VisitorGroups.Api.ModelBinding.VisitorGroupModelBinder.Validate()

#296322
Edited, Feb 10, 2023 13:10
Vote:
 

Try the following  (Copy and pasted from another post reply) 

If its just locally you want to get this to work and not fussed about the visitor groups, than try the following  

  • Run Stored Procedure BigTableDeleteAll
  • Delete the Contents in : VW_VisitorGroup 

If you are inclided to find which Visitor group you might be missing you can look up in the View VW_VisitorGroup and map what you have setup in codebase. 

When we did the upgrade from 11 to 12 at the time we found Episerver.Forms.Samples was not upgraded theirfor missing some visitor groups. 

Hope this helps 

#296323
Feb 10, 2023 14:17
Vote:
 

Thanks Minesh, and sorry for the late reply. I've not dared to run BigTableDeleteAll yet as there is a lot of other stuff in that table. We have a backup of the original database, but we did a lot of manual tweaks during the upgrade and I'm afraid it will take us some time to get everything up and running again if we need to start from scratch. I will probably try what you suggest, but after we have discovered/estimated all/most other "challenges" we have with the upgrade to CMS 12 (and they are plenty).

#297292
Feb 27, 2023 6:02
Vote:
 

I think you need to just update namespace to he new name as they changed namespaces

#297349
Feb 27, 2023 20:24
Vote:
 

If you have custom visitor group criterion defined in code, then there are a couple things to keep in ming when upgrading to cms 12 :

  1. If you've refactored code that resuted in change of assembly name or namespace on these, you will most likely need to revert that, as that won't match up to whats saved on cms 11 database.
  2. There have been changes to property attributes, where DojoWidget attribute is now obsolete and you should instead use CriterionPropertyEditor attribute instead. The save logic has also changes, so ensure to have both getters and setters on your model properties. More details here.

As for categories, if you have custom categories in code, you will need to give them a Guid that matches your cms 11 database, or else the code will create new ones, and because the same name already exists in DB, it will append a (1) to the new one's name and that won't match your conditions in code and result in runtime errors.

#298298
Mar 14, 2023 13:51
Vote:
 

Thank you Mark and Ritu! We have some custom logic for visitor groups that might need to be updated, but no custom categories or similar, so otherwise I cross my fingers and hope that a namespace update is all that is needed. 😬

#298370
Mar 15, 2023 16:29
Vote:
 

We had a similar issue after upgrading to CMS 12. We noticed the error below in the logs which was due to the use of the 'User Profile' criterion in the CMS 11 site. 

2023-10-30T02:46:20.314688657Z fail: EPiServer.Personalization.VisitorGroups.VisitorGroupRole[0]
2023-10-30T02:46:20.314901362Z       Unable load criterion of type 'EPiServer.Personalization.VisitorGroups.Criteria.UserProfileCriterion, EPiServer.Cms.AspNet'
2023-10-30T02:46:20.315123367Z       System.IO.FileNotFoundException: Could not load file or assembly 'EPiServer.Cms.AspNet, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

Every visitor group that used the old AspNet 'User Profile' criterion had to be manually updated in the CMS to use the new version. Editing the Visitor Group in the CMS reveals the same error.

User Profile now lives in Site Criteria.

I hope this helps fellow upgraders 😃

#311691
Oct 30, 2023 3:36
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.