I have a solution where Commerce were installed but never used and now we have removed it.
The problem is that now in the set access rights page in Admin we get this message:
Could not create instance of content type "SalesCampaignFolder" since it has an invalid .NET class associated: EPiServer.Commerce.Marketing.SalesCampaignFolder, EPiServer.Business.Commerce, Version=18.104.22.168, Culture=neutral, PublicKeyToken=8fe83dea738b45b7
And if I try to delete that type in admin I get this message
The content type could not be deleted since it is in use.
Are there any way to fix this without doing it directly in the database?
Time for me to shine then. Adding this code to your initialization module should fix it
var contentRootService = context.Locate.Advanced.GetInstance<ContentRootService>();
Thanks!!Great help as always!!!
Sorry, didn't work
What didn't work? Any error message?
No error message, the init module runs and gives no error but nothing is happening and the error is still there, and the folders are still there
If I try to remove it manually I get this error:
But I can not go in and manually delete that content.
You can probably try
var contentRootRepository = context.Locate.Advanced.GetInstance<ContentRootRepository>();