Hotfix Instructions - Kentico 12

Hotfixes enable you to fix problems in 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.

Note

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

Table of Contents

Installing the hotfix

  1. Download the installer for the required hotfix version from the Kentico DevNet portal.
  2. Run the Hotfix_<version>.exe file.
  3. Go through the hotfix installation procedure.

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

Prerequisites

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:

  1. 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.
  2. Hotfix the local instance by running the Hotfix Utility. See: Hotfixing your local project
  3. Test that the hotfixed local website works correctly.
  4. 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

  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.
    • 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
  5. Choose a method of taking the project offline and back online.
  6. Click Next to start the hotfix procedure.
  7. After the update finishes, click Next to view any problems that may have occurred and the instructions to solve them.
  8. If you use a project of the web application type, open the Kentico solution in Visual Studio 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 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.

  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 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.

  3. 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 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. If you use a project of the web application type, open the Kentico solution in Visual Studio and 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:

  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.

Additional notes and workarounds

12.0.9

  • 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"/>

    Important

    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 Code Library projects, without needing to add the entire Kentico.AspNet.Mvc package and its content items (which are only intended for MVC web projects).

12.0.12

  • 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).

12.0.14

  • 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.

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?