Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

content_version (migration step)

Restores an earlier version of a content object or removes its old versions.

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/examples/migration-steps/content_version.md

On this page

content_version

Restores an earlier version of a content object or removes its old versions.

A step of a YAML migration with type: content_version. The class expMigrationStepContentVersion (kernel/classes/migration/steps/expmigrationstepcontentversion.php) is registered in settings/migration.ini [StepSettings] StepTypeList[content_version].

Modes

mode: is one of restore, cleanup; every step names one.

Keys

KeyTypeModesDefaultWhat it is
objectidentifier (object)allthe object (or node:)
nodeidentifier (node)alla node of the object (or object:)
versionintrestorethe number of the version to restore (restore)
languagestringrestorerestore only this language of the version (default: every language it has)
keepintcleanup0how many archived versions are kept, the newest (cleanup)
draftsboolcleanupfalsetrue: the drafts of the object are removed too (cleanup)
workflowsboolrestorefalsetrue: the workflows of the operation's triggers run, as in the administration (default: they do not)
notifyboolrestorefalsetrue: the publish makes a notification event (default: published without notification)

Besides these, every step takes the keys of the engine: type, mode, if, references, environments, engines and comment (the file format). A key of type identifier names a node, an object or another part of the installation by id, remote id, path or name (identifiers).

Values for references

references: { <name>: <value> } keeps a value of the step's result as ${ref.<name>} for the steps and migrations after it:

ValueWhat it is
object_idthe id of the object
versionits current version after the step
removedhow many versions cleanup removed

Undoing

A step of this type does not undo itself: a migration with it needs down: or a rollback to its caption.

Caches it touches (cleared after the run): content.

Example

- type: content_version
  mode: cleanup
  object: remote:news-welcome
  keep: 5

Generated by ./console exp:help:examples from settings/migration.ini, kernel/classes/migration/steps/expmigrationstepcontentversion.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x