Hotfix Instructions - Kentico 12 Source Code

Hotfixes enable you to fix problems in your installation of Kentico. You can view the list of fixed bugs on the Kentico DevNet portal.

To obtain source code hotfixes, please use the Kentico Client Portal.

The following instructions apply only to the source code version of Kentico. For standard installations, please see Hotfix Instructions - Kentico 12.

Kentico 12 Service Pack

Hotfix 12.0.29 is the Kentico 12 Service Pack, which represents a larger update than a standard hotfix. If you wish to apply hotfix 12.0.29 or newer, please view the updated hotfix instructions in the Service Pack documentation.

For more information about the included changes, see the Service Pack release notes.


Always back up your project files and database before applying a hotfix.

Table of Contents

Installing the hotfix

  1. Run the Hotfix_<version>_src.exe file.
  2. Go through the hotfix installation procedure.

By default, the installer places the hotfix into the C:\Program Files\Kentico\<version>\Hotfix<version> folder.


If your system stores virtual objects on the file system (due to enabled deployment mode or source control options), you need to return the files to the database before you apply the hotfix. After you finish the hotfix procedure, re-enable deployment mode or source control and rebuild the solution in Visual Studio.

Applying the hotfix

To apply the hotfix to websites that use a local source code development instance, use the following general process:

  1. Hotfix the source code instance by running the Hotfix Utility. See: Hotfixing your source code project
  2. Test that the hotfixed local website works correctly.
  3. Redeploy the project files to your production environment (using your preferred publishing process.
  4. Apply the hotfix SQL script to your production database. See: Hotfixing your production database

Hotfixing Microsoft Azure applications

If your website is hosted on Microsoft Azure, the recommended hotfix process is the same as outlined above. First apply the hotfix to a local instance, then redeploy to Azure and run the hotfix SQL script against your production database.

Hotfixing your source code project

Note: For further information, see: Upgrading and hotfixing an instance

  1. Run Kentico Hotfix Utility (Hotfix.exe) from the location where you installed the hotfix (C:\Program Files\Kentico\<version>\Hotfix<version> folder by default).
  2. Select your project folder using the Browse button or type in the path to the project manually.
  3. Use the utility to back up your project files and/or database (or skip these steps if you already have backups).
  4. Select which components you want to update. Click Switch to advanced mode if you wish to change the settings. We recommend updating all components.
    • Source files – all files in the source code, except for the web project in the CMS folder
    • Setup files – the Kentico installer and external utilities (which are separate from the web project)
    • SQL script – the database structure and data
    • Kentico files – the web project files in the CMS folder
  5. Choose a method of taking the project offline and back online.
  6. Click Next to start the update procedure.
  7. After the update finishes, click Next to view any problems that may have occurred and the instructions to solve them.
  8. Open the solution in Visual Studio, follow the compilation instructions, and rebuild the solution.

Preparing the hotfixed project files manually

If you do not wish to go through the user interface of the Hotfix Utility, you can create the hotfixed project files manually using the command line. For example, this can be useful if you wish to integrate the hotfix into a more complex scripted procedure.

  1. Navigate to the location where you installed the hotfix (C:\Program Files\Kentico\<version>\Hotfix<version> folder by default).
  2. Run Hotfix.exe from the command line with the /deploy and /path parameters:
    • Set the /deploy parameter value to net461app.
    • Use the /path parameter to specify the location where the utility creates the update files. Use a relative path (folder in the location where the utility was executed) or absolute path (any location on a local disk).

    Example: Hotfix.exe /deploy=net461app /path=Deploy

    Creates a folder named Deploy in the directory from which the utility was executed, and copies all files and folders necessary for updating a source code project to the given hotfix version.

  3. Copy the update files created by the Hotfix Utility into your Kentico project (overwrite the original files).

    • If you have previously modified some of the project files, DO NOT OVERWRITE these files. You need to compare the modified files with the new versions and make appropriate changes manually.

  4. Open the solution in Visual Studio, follow the compilation instructions, and rebuild the solution.

Hotfixing MVC projects

For websites created using the MVC development model, you need to apply the hotfix to the Kentico source code project (see above), and additionally update the Kentico code used by your MVC application:

  1. Open your MVC application in Visual Studio.
  2. Right-click your MVC project in the Solution Explorer and select Manage NuGet Packages.
  3. Update the Kentico.AspNet.Mvc NuGet package to the version that matches the applied hotfix.

Hotfixing your production database

Update your production database as the last step in the hotfix process, after you test the hotfix locally. This ensures minimum downtime for your live site while avoiding loss of data.

The hotfix version of the database must match the version of the web project, so you need to perform the update together with the redeployment of the hotfixed project files.

To update your production database, manually execute the hotfix database scripts (for example using SQL Management Studio). The script files are located in the SQL folder of your hotfix installation directory.

  • If you do not use separated databases – run Hotfix_separated.sql first and then Hotfix_default.sql.
  • If you use separated databases – run Hotfix_separated.sql on the separated database and Hotfix_default.sql on your main database.
  • Note: The script files may be empty if the given hotfix does not require any SQL scripts for the related tables (skip the file in these cases).

After applying the hotfix

All users who work with the Kentico administration interface should clear the cache in their browsers after applying the hotfix. Otherwise, some features in the administration interface may not be displayed correctly.

After applying the hotfix to a development instance that has continuous integration enabled, you need to run complete serialization for all objects to recreate the content of the CIRepository folder (use the Continuous integration application in the Kentico administration interface). Apply the hotfix separately for each instance in your development environment. After one developer commits the hotfixed changes to the source control, other developers CANNOT commit or load changes until they apply the hotfix to their own instance.

Updating setup files and external utilities

Hotfixes provide bug fixes for all files related to the Kentico installation, which includes the installer and other external utilities, such as Kentico Installation Manager and Kentico Service Manager.

To update these files and utilities, you need to apply the hotfix to the setup files:

  1. When running the hotfix utility, click Switch to advanced mode in the Change confirmation step.
  2. Select the Setup files checkbox.
  3. Click Next.
  4. In the Running applications step, stop any applications that are currently running from the setup files.
  5. Click Next and continue through the rest of the hotfix procedure.

The hotfix makes any required changes to the files in the directory where you installed your Kentico setup files.

Source code compilation instructions

After applying the hotfix, please perform the following steps in Visual Studio to ensure that the source code works correctly and can be compiled:


  • Manually include the PreviewResponseRedirectionModule.cs file into the Kentico.Content.Web.Mvc project:
    1. Click Show all files at the top of the Solution Explorer.
    2. Open the MVC folder and expand the Kentico.Content.Web.Mvc project.
    3. Locate the PreviewResponseRedirectionModule.cs file (in the Preview folder).
    4. Right-click the file and select Include in Project.


  • Manually include the StagingTaskDataBinder.cs file into the Synchronization project:
    1. Click Show all files at the top of the Solution Explorer.
    2. Open the Libraries -> Platform -> CoreAndData folder and expand the Synchronization project.
    3. Locate the StagingTaskDataBinder.cs file (in the Staging -> Tasks folder).
    4. Right-click the file and select Include in Project.


  • Manually include the IX509StoreLocationProvider.cs and X509StoreLocationProvider.cs files into the Synchronization.WSE3 project:
    1. Click Show all files at the top of the Solution Explorer.
    2. Open the Libraries -> Platform -> CoreAndData folder and expand the Synchronization.WSE3 project.
    3. Select the IX509StoreLocationProvider.cs and X509StoreLocationProvider.cs files.
    4. Right-click and select Include in Project.


  • Manually perform the following file changes:
    1. Open the MVC folder and expand the Kentico.Content.Web.Mvc project.
    2. Delete the following files:
      • Preview\PreviewGlobalFilters.cs
      • Preview\PreviewUrlsFilter.cs
    3. Click Show all files at the top of the Solution Explorer.
    4. Select the following new files:
      • PageBuilder\RichTextProcessing\IPreviewLinksConverter.cs
      • PageBuilder\RichTextProcessing\PreviewLinksConverter.cs

      • PageBuilder\Configuration\ComponentPropertiesProcessor.cs

      • Content\ContentGlobalFilters.cs
      • Content\ContentOutputActionFilter.cs
    5. Right-click and select Include in Project.

Additional notes and workarounds


  • E-commerce – Products that use inventory tracking and have the Sell only if items available property enabled may in some cases be sold even when the inventory is depleted, if multiple customers place orders concurrently. After applying the hotfix, the system logs a warning into the event log if such a situation occurs. Additionally, the hotfix allows you to prevent the creation of such orders by enabling strict inventory management – use the new CMSUseStrictInventoryManagement web.config key:

    <add key="CMSUseStrictInventoryManagement" value="true"/>


    With strict inventory management enabled, the system throws an InvalidOperationException when a customer attempts to create an order containing a product that became out-of-stock due to another concurrently placed order. The default checkout web parts on Portal Engine sites handle the exception and display an error message.

    If you wish to enable the CMSUseStrictInventoryManagement key on an MVC site or a Portal Engine site with custom checkout components, you need to manually ensure that your custom code handles the exception and displays appropriate information to customers.

  • MVC – Starting from version 12.0.9, the Kentico.AspNet.Mvc NuGet package no longer directly contains the Kentico API libraries used for MVC development. Instead, the libraries are part of a new Kentico.AspNet.Mvc.Libraries package, which is a dependency. The change does not require any additional steps when updating the package version. The new package allows developers to install the MVC API libraries into custom Class Library projects, without needing to add the entire Kentico.AspNet.Mvc package and its content items (which are only intended for MVC web projects).


  • Form components – The hotfix removes the 500 character restriction placed on the Text area form component for the MVC Form builder. After applying the hotfix, the character limit is by default set to the maximum number of characters allowed by the underlying database column. This change is only reflected in form fields created after the hotfix was applied. Existing form fields based on the Text area component are still restricted to 500 characters.

    Increasing the character limit for existing fields

    To increase the character limit for existing Text area fields, you can remove the fields from your forms and reinsert them again. However, by doing this you lose all data collected by each field up to this point (the underlying database column holding the data is deleted and recreated). Back up your form data before you remove the fields, and then insert it again into the new fields (for example using an SQL script).


  • Form builder – The hotfix introduces additional API that enables more extensive markup customization options for forms built using the Form builder feature. The additions consist of a new static rendering configuration affecting the entire form's body, and new events that enable contextual modifications of the form and individual form fields (for example, adding accessibility attributes based on a field's type and required status). See Customizing the Form widget for a full overview and examples of the added API.


  • Staging – X.509 certificate authentication for the staging service did not work on instances hosted as an Azure App Service. The system worked with a different certificate store location than the one used by certificates imported into Azure. After applying the hotfix, the correct certificate store location is used (CurrentUser\My). To use certificates for the staging service on Azure, you also need to make them accessible to the application by following the instructions in Load your certificates.


  • MVC – The Insert link dialog, available in the editor on the Content tab for page fields using the Rich text editor form control, incorrectly created page links with absolute URLs, including the site's scheme, domain and application path (i.e. the site's Presentation URL). This could cause broken links when transferring content between different environments, for example using staging. After applying the hotfix, the editor creates page links with virtual relative URLs (~/<link path>). Additionally, the hotfix introduces an output filter that automatically resolves all relative URLs on the side of the MVC live site (based on the environment where the site is actually running). This filter prevents content editors from creating invalid links in cases where your MVC application does not resolve links (by processing the content using the Html.Kentico().ResolveUrls method). If you want to disable this output filter and resolve relative links manually, you can add the CMSMVCResolveRelativeUrls key to the appSettings section of your MVC project's Web.config file:

    <add key="CMSMVCResolveRelativeUrls" value="false" />

    Fixing existing content with absolute links

    Hotfix 12.0.26 only changes how new page links are saved by the rich text editor. Existing links remain stored with absolute URLs. You can fix the links by resaving them manually after you apply the hotfix. To find links with absolute URLs on your website, you can use the process described in the How to fix links inserted via WYSIWIG editor in Kentico 12 article.

  • Import/Export – When a package containing site-specific data was imported, the system forced the rebuild of all smart search indexes assigned to the site where the data was imported. This occurred for all imported objects and could result in long and unnecessary rebuild operations for large indexes. The hotfix disables the forced index rebuild and introduces a new Rebuild site search indexes setting in the Objects selection step of the import wizard, allowing users to determine whether an index rebuild is necessary for each individual import.

Fixed bugs

For a full list of bugs covered by the hotfix, open the Hotfixes page on DevNet and click Fixed bugs for the appropriate Kentico version.

Was this page helpful?