Upgrading an existing site. Admin site fails when editing anything

KenticoAdmin AgFirst asked on April 11, 2024 17:20

I created a new instance of Kentico 13 Admin site and API and pointed the new apps to the old database. I ran the upgrade.sql script that came with the update app on the db and everything works except when I try to Edit anything. I get the following error:

Image Text

The cms.cssstylesheet table was dropped by the upgrade script but apparently its referenced somewhere. [InvalidOperationException: Object type 'cms.cssstylesheet' not found.]

How can I fix this?

Correct Answer

Brenden Kehren answered on April 11, 2024 19:58

There is code that is executed when the site is first run after an upgrade. This code is in a zipped folder (.zip) under the /CMSSiteUtils/Import directory in the CMS project. But since you didn't run the full upgrade process against the CMS project and started with a fresh install of v13, you won't have this zip file. You will manually have to copy this file from here:

C:\Program Files (x86)\Kentico\13.0\Upgrade120_130\CMS\CMS\CMSSiteUtils\Import\Upgrade_120_130.zip

to your v13 site in the same location <your project>/CMS/CMSSiteUtils/Import in the v13 code.

There is another problem as well, you've already upgraded the database so you'll either have to revert it back to v12 and rerun the process again with this file in place or update the data necessary so the code is executed properly on the first start of the CMS after the upgrade.

Once the upgrade is run properly, then it's a matter of dealing with the rest of the items from there.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on April 11, 2024 17:27

There are many questions to be asked here.

  1. What version did you upgrade from?
  2. What API did you point to the database?
  3. What development version were you using for the old database? Portal Engine or MVC?
  4. Where did you get the upgrade script from?

Let's start with these and go from there.

0 votesVote for this answer Mark as a Correct answer

KenticoAdmin AgFirst answered on April 11, 2024 19:34

1.I started from Kentico 12 with the latest hotfix. 2. I had created a new instance of Kentico 13 dotnet Core. I used the new WebApp generated by the Kentico 13 installer and ported over the old code to the new WebApp sln. 3. MVC 4. This page had a download for Xperience 13 upgrade. It contains a upgrade.sql script. https://docs.kentico.com/13/installation/upgrading-to-xperience-13#installing-the-upgrade-procedure

0 votesVote for this answer Mark as a Correct answer

KenticoAdmin AgFirst answered on April 11, 2024 20:57

Great!, I'll give it a try

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on April 12, 2024 05:27

If you point a new K13 to a DB, then you are missing the code upgrade part as the instance does not contain it plus what Brenden wrote.
I would rather recommend installing fresh K12 instance, connect it to the v12 DB you have and upgrade this instance. So you have correctly upgraded code files and DB together.

0 votesVote for this answer Mark as a Correct answer

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