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 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=220.127.116.11, 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()
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
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
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).
I think you need to just update namespace to he new name as they changed namespaces
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 :
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.
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. 😬