---
title: Hotfix Instructions - Kentico 8.1 Source Code
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

Hotfixes allow you to fix problems in your installation of Kentico. You can view the list of fixed bugs on the [Kentico DevNet portal](http://devnet.kentico.com/download/hotfixes).

To obtain source code hotfixes, _**please contact your Kentico sales representative**_.

> **Info:** The following instructions apply only to the source code version of Kentico. For standard installations, please see [Hotfix Instructions - Kentico 8.1](https://docs.kentico.com/k81/installation/hotfix-instructions-kentico-8-1.md).

> **Note:** **Note**
>
> Hotfixes are not tested for all possible scenarios, so you may experience issues after applying the hotfix.
>
> Always **backup your project files and database** before applying a hotfix.

## Table of Contents

## Applying the hotfix to a local project

1. If your system stores virtual objects on the file system (due to enabled [Deployment mode](https://docs.kentico.com/k81/deploying-websites/deployment-mode-for-virtual-objects.md) or source control options), return the files to the database. After you apply the hotfix, re-enable deployment mode or source control and rebuild the solution.
2. Run **Kentico Hotfix Utility (Hotfix.exe)** from the location where you installed the hotfix.
3. Select your project installation folder using the **Browse** button or type in the path to the project manually.
4. Use the application to back up your project files and/or database if you haven’t already done so.
5. Select whether you want to update source files, database, CMS project files or all of them. We recommend updating all components.
6. Choose a method of taking the project offline and back online.
7. Click **Next** to start the update procedure.
8. After the update finishes, click **Next** to view any problems that may have occurred and the instructions to solve them.
9. Open the project solution in Visual Studio and follow the [compilation instructions](#source-code-compilation-instructions).
10. Rebuild the solution.

For more information, see [Kentico Hotfix and Upgrade Utility](https://docs.kentico.com/k81/external-utilities/kentico-hotfix-and-upgrade-utility.md).

## Applying the hotfix to a remote project

If you cannot access your web project directly (e.g. when the project is located on a remote hosting server), you can use the Hotfix Utility to create the updated file structure and then upload them to your web project location. 

1. Run **Hotfix.exe** from the command line with the **/deploy=net45app** parameter.\
   Example: _Hotfix.exe /deploy=net45app_\
   This launches the Hotfix Utility, which then creates the files and folders necessary for updating the source code project and saves them into the folder chosen in the first step of the Hotfix Utility wizard.

   Additionally, you can provide the **/path** parameter, which tells the application where to create the file structure. This way you won’t have to set the path in the first step of the Hotfix Wizard.

   You can supply the **/path** parameter in two different formats – **relative**, which represents a folder in the location from which the utility was executed; or **absolute**, which can be any path to a local disk.

   Example: _Hotfix.exe /deploy=net45app /path=Deploy_\
   This launches the Hotfix Utility, which then 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 into that folder.
2. Once you have the update files ready, take your website offline. You can do this by copying the **App\_Offline.htm** file from the hotfix installation directory into the root of the remote web project.
3. Upload the update files created by the Hotfix Utility into your remote web project (overwrite the original files).

   > **Note:** **Important**
   >
   > If you have previously modified some of the Kentico project files, DO NOT OVERWRITE these files. You could lose your modifications.
   >
   > You need to compare the modified files with the new versions and make appropriate changes manually.
4. Manually execute the hotfix SQL scripts on your Kentico database.

   - If you do not use separated databases - run the **Hotfix\_separated.sql** and **Hotfix\_default.sql** script files located in the **SQL** folder of your hotfix installation directory. We recommend running the files in the described order.
   - If you use [separated databases](https://docs.kentico.com/k81/on-line-marketing-features/contact-management/separating-the-contact-management-database.md) - run the **Hotfix\_separated.sql** script file on the separated database and **Hotfix\_default.sql** on your main database. The script files are located in the **SQL** folder of your hotfix installation directory.
5. Open the project in Visual Studio, follow the [compilation instructions](#source-code-compilation-instructions), and rebuild the solution.
6. Bring your website back online (delete the **App\_Offline.htm** file).

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

## Updating setup files and external utilities

The hotfix contains bug fixes for all the files in the Kentico installation. This includes the installer with its associated files and external utilities, such as Kentico Installation Manager or Kentico Service Manager. In order to update these files and utilities, you need to launch the Hotfix utility with an additional parameter - **/setuppath** - which specifies the location where you installed Kentico (typically the _Program Files_ folder).

When launched with the parameter, the Hotfix utility offers the option of updating the setup files in the **Change confirmation** step.

Example: _Hotfix.exe /setuppath="c:\Program Files (x86)\Kentico\8.1"_ launches the Hotfix utility, which then tries to update all original files in the default installation directory.

## 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:

### Hotfix 8.1.6

- Manually include the _SocialMarketingAutoPostControl.cs_ file into the _SocialMarketing_ project:
  1. Click **Show all files** at the top of the Solution Explorer.
  2. Locate the _SocialMarketingAutoPostControl.cs_ file (in the _SocialMarketing_ folder).
  3. Right-click the file and select **Include in Project**.
- Add references to the following libraries in the _SocialMarketing_ project:
  - ExtendedControls
  - FormControls

### Hotfix 8.1.9

- Manually include new files into the _DocumentEngine_ project:
  1. Expand the **DocumentEngine** project and navigate to the **Handlers\Document** folder.
  2. Click **Show all files** at the top of the Solution Explorer.
  3. Select the **DocumentDataEventArgs.cs** and **DocumentDataEventHandler.cs** files.
  4. Right-click and select **Include in Project**.
- Manually include new files into the _DataEngine_ project:
  1. Expand the **DataEngine** project and navigate to the **Handlers\Objects** folder.
  2. Click **Show all files** at the top of the Solution Explorer.
  3. Select the **ObjectDataEventArgs.cs** and **ObjectDataEventHandler.cs** files.
  4. Right-click and select **Include in Project**.

### Hotfix 8.1.11

Manually include new files into the _ApplicationDashboard_ project:

1. Expand the **ApplicationDashboard** project and navigate to the **Models** folder.
2. Click **Show all files** at the top of the Solution Explorer.
3. Select the **TileIconTypeEnum.cs** and **TileIconModel.cs** files.
4. Right-click and select **Include in Project**.

### Hotfix 8.1.14

Manually include new files into the _PDFClown_ project:

1. Expand the **PDFClown** project and navigate to the **src/org/pdfclown** folder.
2. Click **Show all files** at the top of the Solution Explorer.
3. Select the **cms** subfolder.
4. Right-click the folder and select **Include in Project**.

### Hotfix 8.1.19

- Add a reference to _\~\Lib\Microsoft.SqlServer.TransactSql.ScriptDom.dll_ in the **DataEngine** project.

## Additional notes and workarounds

### Hotfix 8.1.2

- WYSIWYG editor - Hotfix 8.1.2 adds the [CKEditor:DefaultToolbarSet](https://docs.kentico.com/k81/references/reference-web-config-application-keys.md#wysiwyg-editor-settings) web.config key. The key allows you to set the default toolbar when using the 'default' option for [toolbar sets](https://docs.kentico.com/k81/managing-website-content/configuring-the-environment-for-content-editors/configuring-the-editor/personalizing-the-editor-toolbars-and-buttons.md) on a page.
- AD Import - After applying hotfix 8.1.2 to the Kentico setup files, the import settings in the AD Import utility provide the **Import all users from selected groups and ignore other users** option, which allows more efficient import of users from specific AD groups.

### Hotfix 8.1.6

- Microsoft account authentication - To ensure that users can log out correctly when using Microsoft account authentication, add the URL of your website's default page (Home page) as a **Redirect URL** of your application in the Microsoft account Developer Center. The site's default page URL depends on the **Content -> Default alias path** and **URLs and SEO -> Default page** settings.

### Hotfix 8.1.8

- Macros - Hotfix 8.1.8 resolves the issues with context macros in Online marketing:

  - Contact groups, Marketing automation, Personas, Scoring - Macros and rules that require the request context do not work (you can only use macros using _contact_, _current time_ or _current date_ data). The system now hides macro rules that require context from such conditions. To prevent false positives in existing conditions, you need to remove occurrences of macros and rules that require context.
  - Marketing automation triggers - The _Contact is in persona_ macro rule didn’t work.
    - If you created your condition using the _Rule designer_, you need to click _Edit_ next to the condition field and then update the condition by clicking _Save & Close_ in the opened dialog. Finally, you need to save the trigger.
    - If you wrote the macro manually (for example on the _Code_ tab), you need to replace your macro condition with the updated version. For example, replace _Contact.IsInPersona(GetObject("personas.persona", "f4c665b8-980e-4d6a-ade7-329b34543659", CurrentSite.SiteID))_ with _Contact.IsInPersona("f4c665b8-980e-4d6a-ade7-329b34543659")_.

### Hotfix 8.1.11

- Macros - Hotfix 8.1.11 changes how macros check permissions for page collections. When a page collection _(TreeNodeCollection)_ is accessed in a macro expression (for example through the _Children_ property of a page), the permission check is now performed for the user who signed the macro, instead of the user viewing the page. To get a collection of pages filtered according to the permissions of the current user, use the _WithPermissionsCheck_ property of the collection.

## Fixed bugs

For a full list of bugs covered by the hotfix, open the [Hotfixes page](http://devnet.kentico.com/download/hotfixes) on DevNet and click **Fixed bugs** for the appropriate Kentico version.
