Migration of Kentico 11 to 12

Vishal Bhatt asked on January 4, 2023 08:23

I am migrating kentico 11 portal engine to 12 portal engine with the help of CodeUpgrade tool and Upgrade_11_0_12_0. But I am getting the error on UniSelectorWithEditor.ascx.cs file for

ValidationHelper.GetHashString(String.Empty);

Do I need to resolve the issue manually or will the tool do it automatically?

Correct Answer

Liam Goldfinch answered on January 4, 2023 11:21

You can check all K11 to K12 API changes here -> https://devnet.kentico.com/documentation/api-changes/kentico-12

It looks like the method you are using was removed - https://devnet.kentico.com/documentation/api-changes/kentico-12/26142

Based on that you could probably change that to:

var classSites = ClassSiteInfoProvider.GetClassSites().WhereEquals(nameof(ClassSiteInfo.SiteID), sourceSite.SiteID))
0 votesVote for this answer Unmark Correct answer

Recent Answers


Liam Goldfinch answered on January 4, 2023 10:08

In the upgrade from 11 to 12, there was an API change:

https://devnet.kentico.com/documentation/api-changes/kentico-12/26681

So you just need to manually add the second parameter, which is a HashSettings. From what I've seen you could just change your code to:

ValidationHelper.GetHashString(String.Empty, new HashSettings(String.Empty));

0 votesVote for this answer Mark as a Correct answer

Vishal Bhatt answered on January 4, 2023 11:13 (last edited on January 4, 2023 11:15)

Thanks @Liam Goldfinch After solving the above issue manually now getting the error on the below code.

var classSites = ClassSiteInfoProvider.GetClassSites("SiteID = " + sourceSite.SiteID );

The error is No overload for method 'GetClassSites' takes 1 arguments

Do I need to solve it manually too?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.