Breaking: #55298 - Decoupled sys_history functionality

See Issue #55298

Description

Tracking of record changes within the TYPO3 Backend is now handled via the database table sys_history only, the connection towards sys_log has been removed - at the same time, the backend view for showing the history of a database record has been updated.

BE-log module

Referencing history entries within the BE-Log module is now done reverse (sys_log has a reference to an existing sys_history record, and not vice-versa), speeding up the module rendering. The following related PHP classes have been removed which were previously needed for rendering within the BE-Log backend module:

  • \TYPO3\CMS\Belog\Domain\Model\HistoryEntry
  • \TYPO3\CMS\Belog\Domain\Repository\HistoryEntryRepository
  • \TYPO3\CMS\Belog\ViewHelpers\HistoryEntryViewHelper

History view

The "highlight" functionality for selecting a specific change within the history module of the TYPO3 Backend has been removed.

A clear separation of concerns has been introduced between ElementHistoryController, which is the entry-point for viewing changes of a record, and RecordHistory. The latter is now the place for fetching the history data and doing rollbacks, where the Controller class is responsible for evaluating display-related settings inside the module, and for preparing and rendering the Fluid-based output.

The following public PHP methods have now been removed or made protected.

  • TYPO3\CMS\Backend\History\RecordHistory->maxSteps (see the added setMaxSteps() method)
  • TYPO3\CMS\Backend\History\RecordHistory->showDiff
  • TYPO3\CMS\Backend\History\RecordHistory->showSubElements (see the added setShowSubElements() method)
  • TYPO3\CMS\Backend\History\RecordHistory->showInsertDelete (moved into controller)
  • TYPO3\CMS\Backend\History\RecordHistory->element
  • TYPO3\CMS\Backend\History\RecordHistory->lastSyslogId
  • [not scanned] TYPO3\CMS\Backend\History\RecordHistory->returnUrl
  • TYPO3\CMS\Backend\History\RecordHistory->showMarked
  • TYPO3\CMS\Backend\History\RecordHistory->main() (logic moved into controller)
  • TYPO3\CMS\Backend\History\RecordHistory->toggleHighlight()
  • Method parameter of TYPO3\CMS\Backend\History\RecordHistory->performRollback()
  • TYPO3\CMS\Backend\History\RecordHistory->displaySettings() (logic moved into controller)
  • TYPO3\CMS\Backend\History\RecordHistory->displayHistory() (logic moved into controller)
  • TYPO3\CMS\Backend\History\RecordHistory->displayMultipleDiff() (logic moved into controller)
  • TYPO3\CMS\Backend\History\RecordHistory->renderDiff() (logic moved into controller)
  • TYPO3\CMS\Backend\History\RecordHistory->generateTitle() (logic moved into controller)
  • TYPO3\CMS\Backend\History\RecordHistory->linkPage() (logic moved into view)
  • TYPO3\CMS\Backend\History\RecordHistory->removeFilefields()
  • TYPO3\CMS\Backend\History\RecordHistory->resolveElement()
  • TYPO3\CMS\Backend\History\RecordHistory->resolveShUid()
  • TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController->content
  • TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController->doc
  • TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController->main()

Impact

Calling any of the PHP methods will result in a fatal PHP error. Getting or setting any of the PHP properties will trigger a PHP warning.

Using the affected database tables directly will produce unexpected results than before.

Affected Installations

Any installation using the record history, or extensions extending sys_history.

Migration

An upgrade wizard to separate existing history data from sys_log can be found within the Install Tool.

The install tool also checks for existing extensions making use of the dropped and changed PHP code.