Update Existing Content Items

Overview

Update existing content items in a specific environment, such as production, when deploying a new release.

Stakeholders

  • Developer
  • Administrator

Prerequisites

  • No content items in the target environment are currently being edited.
  • No content items in the target environment have pending publication requests.

Updating Existing Content Items with Updater Scripts

When deploying a new release, you may need to modify existing content items. Common scenarios include:

  • Adding a new field with a required default value to a document template, which must be set on all existing documents.
  • Introducing a new variant to an image set template, which must be added to all existing image sets.

To perform these updates, create and execute an Updater Script. Develop and test the script in your development environment using the Updater Editor in the CMS UI. After validation, include the script in your release package so it can be executed in the target environment after deployment.

Follow these steps:

  1. Identify which content types require updates and define the necessary changes for their content items.
  2. Write an Updater Script to implement these changes using the Updater Editor in your development environment.
  3. Test the Updater Script on relevant content in your development or test environment.
  4. When the script is ready, add it to your project's repository-data-application module. This ensures it is registered in the updater registry at JCR path /hippo:configuration/hippo:update/hippo:registry during deployment in the target environment.
  5. Prepare and release the required artifact(s) as part of your deployment process.
  6. Deploy the release artifact(s) to the target environment.
  7. An administrator executes the Updater Script in the target environment. The script applies the updates to the affected content items.

Summary

  • Update existing content items in the target environment as part of a new release when required.
  • Use Updater Scripts to modify existing content items.
  • Develop and test Updater Scripts in the development environment.
  • Package Updater Scripts with the release artifact(s).
  • An administrator executes the Updater Script in the target environment after deployment.
Share Feedback
Page: /build/content-updates/update-existing-content-items
Section: Build
Category *