Hotfixes enable you to fix problems and apply updates to your installation of Kentico. You can download hotfix packages and view the list of fixed bugs on the Kentico DevNet portal.
If you have the source code version of Kentico, please see Hotfix Instructions - Kentico 12 Source Code.
Kentico 12 Service Pack
The Kentico 12 Service Pack is released in the form of hotfix 12.0.29 or newer. Follow the standard hotfix instructions described on this page to apply the service pack to your project.
We recommend using the latest hotfix version to install the service pack. You may otherwise encounter issues related to the MVC page builder functionality in the initial service pack release.
Always back up your project files and database before applying a hotfix.
Table of Contents
Installing the hotfix
- Download the installer for the required hotfix version from the Kentico DevNet portal.
- Run the Hotfix_<version>.exe file.
- Go through the hotfix installation procedure.
By default, the installer places the hotfix into the C:\Program Files\Kentico\<version>\Hotfix<version> folder.
You can only apply the hotfix to complete Kentico projects that use the standard folder structure (the solution file, GlobalAssemblyInfo.cs, the CMS and Lib sub-folders). For example, the hotfix cannot be applied to deployments of the CMS 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. Re-enable deployment mode or source control after you finish the hotfix procedure.
Applying the hotfix
We do not recommend applying the hotfix directly to your live production site. Use the following general process:
- Set up a local instance of your site (including the web project files and database).
- You can either maintain a permanent local development instance, or get backups of your production site's web projects and database for each hotfix.
- Hotfix the local instance by running the Hotfix Utility. See: Hotfixing your local project
- Test that the hotfixed local website works correctly.
- Redeploy the project files to your production environment (using your preferred publishing process) and apply the hotfix SQL script to your production database (see Hotfixing your production database).
Hotfixing your local project
For more information, see: Upgrading and hotfixing an instance
- Run Kentico Hotfix Utility (Hotfix.exe) from the location where you installed the hotfix (C:\Program Files\Kentico\<version>\Hotfix<version> folder by default).
- Select your project folder using the Browse button or type in the path to the project manually.
- Use the utility to back up your project files and/or database (or skip these steps if you already have backups).
- Select which components you want to update. Click Switch to advanced mode if you wish to change the settings.
- Kentico files – the files of your web project
- Setup files – the Kentico Installer and other external utilities (which are separate from the web project)
SQL script – the database structure and data
We recommend updating all components. To successfully complete the hotfix, you need to update the files of your web project and apply the SQL script to the database.
- Choose a method of taking the project offline and back online.
- Click Next to start the hotfix procedure.
After the update finishes, click Next to view any problems that may have occurred and the instructions to solve them.
Errors that can commonly occur are conflicts with customized files. By default, the hotfix does not overwrite modified files (unless you enable the Overwrite all files option in advanced mode):
For each conflict with a customized file, the process creates the new version of the file with the .new extension. You need to manually transfer your customizations to the new files and then replace the original ones.
Customized files that would have otherwise been deleted remain in the file system, with an added .deleted extension.
- If you use a project of the web application type, open the Kentico solution in Visual Studio and Rebuild the solution.
Open your website in a browser. For MVC sites, you need to open the URL of the Kentico administration interface (not the live site presented by the MVC application).
- When handling the first request, the system performs certain tasks required to complete the hotfix. Processing of the first request may take longer than usual.
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 web 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.
- Navigate to the location where you installed the hotfix (C:\Program Files\Kentico\<version>\Hotfix<version> folder by default).
- Run Hotfix.exe from the command line with the /deploy and /path parameters:
- Set the /deploy parameter value based on the type of your web project:
- net461app – for web application projects
- net461site – for web site projects
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 web application project to the given hotfix version.
- Set the /deploy parameter value based on the type of your web project:
Copy the update files created by the Hotfix Utility into your Kentico web project's root folder (including the CMS and Lib folders, and GlobalAssemblyInfo.cs file). Overwrite the original files.
- If you use a project of the web application type, do NOT copy and overwrite the CMS\CMSApp.csproj file.
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.
- Open DeletedFiles.xml in the update file directory and delete all of the listed files from your web project (you can prepare a batch file to automate the process).
- If you use a project of the web application type:
- Open the Kentico solution in Visual Studio.
- Click Show all files at the top of the Solution Explorer.
- Locate and select all newly added files under the CMSApp project.
- Tip: Identify the new files by using a differencing or merging tool to compare your CMSApp.csproj file with the one from the update files.
- Right-click one of the selected new files and click Include in Project.
- Rebuild the solution.
Hotfixing MVC projects
For websites created using the MVC development model, you need to apply the hotfix to the Kentico administration application (see above), and additionally update the Kentico code used by your MVC application:
- Open your MVC application in Visual Studio.
- Right-click your MVC project in the Solution Explorer and select Manage NuGet Packages.
- 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 the database update is complete, you need to open your website in a browser. For MVC sites, open the URL of the Kentico administration interface (not the live site presented by the MVC application). When handling the first request, the system performs certain tasks required to complete the hotfix. Processing of the first request may take longer than usual.
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:
- When running the hotfix utility, click Switch to advanced mode in the Change confirmation step.
- Select the Setup files checkbox.
- Click Next.
- In the Running applications step, stop any applications that are currently running from the setup files.
- 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.
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.
MVC – When running an MVC site and the Kentico administration application on different domains, a CORS policy error could occur when creating new pages of a content-only page type with the Show Page tab setting enabled. The error was encountered if cross-origin resource sharing was not enabled for the MVC application, and only after installing hotfix 12.0.29 (Service Pack). With hotfix 12.0.30 or newer applied, the resource sharing feature is automatically enabled for all MVC projects.
When your MVC application processes requests sent from the domain of the connected Kentico administration application, it now sends a response with the Access-Control-Allow-Origin header, which enables cross-origin resource sharing.
The UseResourceSharingWithAdministration method of the ApplicationBuilder instance, which was originally used to enable the resource sharing feature, no longer has any effect. We recommend removing the method from the code of your MVC application.
- Search – The SearchParameters.PrepareForPages method created a SearchParameters object that forced a specific level of supported smart search syntax for search queries. This interfered with the smart search functionality, for example not allowing exact field searching to be performed (i.e., the syntax field:"searchquery" was incorrectly processed). The hotfix introduces overloads for the SearchParameters.PrepareForPages method that allow users to configure the levels of supported search syntax per search request when creating the SearchParameters object. See Building a search interface for local indexes in MVC or the smart search API Examples for an overview of the added API.
- Users – Kentico's ASP.NET Identity integration for MVC projects was tightly coupled with the default Kentico.Membership.User class. Any changes to the User class (e.g., added custom properties or additional logic) required a full re-implementation of the entire ASP.NET Identity integration. The hotfix expands the Kentico membership API by introducing the KenticoUserManager, KenticoUserStore, and KenticoSignInManager types, which allow developers to seamlessly integrate custom user types derived from the default Kentico.Membership.User class. If you wish to extend the default User object when working with Kentico's Identity integration, use the new types with the Kentico prefix in your application's code instead of the original non-prefixed types. These types accept a generic parameter that specifies the type of the user class. See Adding custom fields to users for more information and examples.
General – When the Kentico application was hosted behind a proxy server or some other service that masks the application's original domain (e.g., Azure Application Gateway), it generated certain requests with incorrect URLs. This caused errors in parts of the application (e.g., when uploading files into Media libraries). When hosting the Kentico application behind a proxy server, developers need to set the CMSUrlHost web.config key (added by the hotfix) to the host component of the proxy server's URL (omitting the port number, if specified) to ensure the application correctly generates request URLs. Please note that this configuration currently applies only for Portal Engine projects.
For example, assuming the site is running behind the proxy server, add the CMSUrlHost key with the my.proxyserver.com value to the appSettings section of the Kentico project's web.config file:Setting the CMSUrlHost web.config key
<add key="CMSUrlHost" value="my.proxyserver.com" />
See Running Kentico behind a proxy server for a detailed, step-by-step walkthrough of the configuration.
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?