Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.
versioningWS
versioningWS
-
- Type
- boolean
- Path
- $GLOBALS['TCA'][$table]['ctrl']
- Scope
- Proc.
If set, versioning is enabled for this table.
Note
The field details explained here are outdated.
Versioning in TYPO3 is based on this scheme:
[Online version, pid>=0] 1- * [Offline versions, pid==1]
Copied!Offline versions are identified by having a pid value = -1 and they refer to their online version by the field
t3ver_
. Offline versions of the "Page" and "Branch" types (contrary to "Element" type) can have child records which points to the uid of their offline "root" version with their pid fields (as usual). These children records are typically copies of child elements of the online version of the offline root version, but are not considered "versions" of them in a technical sense, hence they don't point to them with theiroid t3ver_
field (and shouldn't).oid In the backend "Offline" is labeled "Draft" while "Online" is labeled "Live".
In order for versioning to work on a table there are certain requirements; Tables supporting versioning must have these fields:
t3ver_
oid - For offline versions; pointing back to online version uid. For online: 0 (zero)
t3ver_
wsid - For offline versions: Workspace ID of version.
For all workspace Ids apart from 0 (zero) there can be only one
version of an element per ID. For online: 0 (zero) unless t3ver_state
is set in which case it plays a role for previews in the backend (to
no de-select placeholders for workspaces, see
\TYPO3\
and for publishing of move-to-actions (seeCMS\ Backend\ Utility\ Backend Utility:: versioning Placeholder Clause ()) \TYPO3\
).CMS\ Backend\ Utility\ Backend Utility:: get Move Placeholder () t3ver_
state -
Contains special states of a version used when new, deleted, moved content requires versioning.
-
For an online version:
- "1" or "2" means that it is a temporary placeholder for a new element (which is the offline version of this record)
- If "t3ver_state" has a value >0 it should never be shown in Live workspace.
-
For an offline version:
- "1" or "2" means that when published, the element must be deleted (placeholder for delete-action).
- "-1" means it is just an indication that the online version has the flag set to "1" (is a placeholder for new records.). This only affects display, not processing anywhere.
-
t3ver_
stage - Contains the ID of the stage at which the record is. Special values are "0" which still refers to "edit", "-10" refers to "ready to publish".
t3ver_
count - 0/offline=draft/never published, 0/online=current, 1/offline=archive, 1+=multiple online/offline occurrences (incrementation happens when versions are swapped offline.)
t3ver_
tstamp - Timestamp of last swap/publish action.
Changed in version 10.0
Field
t3ver_
is not evaluated anymore. It can be safely dropped after the upgrade wizard has been executed.move_ id Corresponding SQL definitions:
t3ver_oid int(11) DEFAULT '0' NOT NULL, t3ver_wsid int(11) DEFAULT '0' NOT NULL, t3ver_state tinyint(4) DEFAULT '0' NOT NULL, t3ver_stage int(11) DEFAULT '0' NOT NULL,
Copied!Special `t3ver_swapmode` field for pages
When pages are versioned it is an option whether content and even the branch of the page is versioned. This is determined by the parameter
tree
set when the page is versioned.Levels -1
means swap only record, 0 means record and content and '> 0' means full branch. When the version is later published the swapping will happen accordingly.