• Document Up to Date

Breaking Changes in CrafterCMS 4.0.x

This section covers changes that might affect your CrafterCMS projects, as well as other considerations before upgrading. Please review the following and apply changes as required:

  • CrafterCMS 4.0.x requires Java 11 and Git. See Requirements and Supported Platforms for more information on CrafterCMS requirements.

  • nodeSelectors now always return an array, even if it’s an array of a single item
    See the following for more information on the change in return values:

  • Elasticsearch has breaking changes, for example: totalHits must now be called totalHits.value
    See here for more information on Elasticsearch breaking changes.

    Please note that most of the breaking changes are from Elasticsearch 6.8 to 7.0. Please take a look at the breaking changes listed for Elasticsearch 7.0 for more information.

  • Upgrading 3.1.x sites

    • CrafterCMS 4.0.0 has a new Studio UI. To get the same Sidebar you’re used to, update the User Interface Configuration

    • Update your Elasticsearch code to match the latest Elasticsearch changes. Elasticsearch has released a new Java API Client to replace the Rest High Level Client.

      See Migrating a site from the previous Elasticsearch client for more information on upgrading to the latest Elasticsearch client and query mechanism

    • Update ICE to move to XB (if desired).

    • CrafterCMS 4.0.x by default now classifies all items under /site as file type, instead of item type.

      Items under preconfigured paths in the Project configuration config/studio/site-config.xml, such as /site/website and /site/components are classified as an item type by default. Before upgrading your version 3.1.x install, non-standard paths/custom paths must be configured under repository.patterns in the Project configuration file config/studio/site-config.xml in order to be classified correctly.

      Any item that is misclassified after an upgrade can be corrected by updating the Project configuration file config/studio/site-config.xml and then editing and saving the misclassified item(s) OR by modifying the system_type field for the item in the item table in the database.


Breaking Changes in CrafterCMS 4.0.3

The following changes in CrafterCMS 4.0.3 might affect your projects when upgrading. Please review the following and apply changes as required: