Deprecation: #84195 - Protected methods and properties in EditDocumentController

See forge#84195


This file is about third party usage (consumer that call the class as well as signals or hooks depending on it) of TYPO3\CMS\Backend\Controller\EditDocumentController.

A series of class properties has been set to protected. They will throw deprecation warnings if called public from outside:

  • $editconf
  • $defVals
  • $overrideVals
  • $columnsOnly
  • $returnUrl
  • $closeDoc
  • $doSave
  • $returnEditConf
  • [not scanned] $uc
  • $retUrl
  • $R_URL_parts
  • $R_URL_getvars
  • $storeArray
  • $storeUrl
  • $storeUrlMd5
  • $docDat
  • $docHandler
  • [not scanned] $cmd
  • [not scanned] $mirror
  • $cacheCmd
  • $redirect
  • $returnNewPageId
  • $popViewId
  • $popViewId_addParams
  • $viewUrl
  • $recTitle
  • $noView
  • $MCONF
  • [not scanned] $doc
  • $perms_clause
  • [not scanned] $template
  • $content
  • $R_URI
  • $pageinfo
  • $storeTitle
  • $firstEl
  • $errorC
  • $newC
  • $viewId
  • $viewId_addParams
  • $modTSconfig
  • $dontStoreDocumentRef

Some properties are set to @internal and may vanish or be set to protected in v10 without further notice:

  • [not scanned] $data
  • $elementsData

All methods not used as entry points by TYPO3\CMS\Backend\Http\RouteDispatcher will be removed or set to protected in v10 and throw deprecation warnings if used from a third party:

  • preInit()
  • doProcessData()
  • processData()
  • [not scanned] init()
  • [note scanned] main()
  • makeEditForm()
  • compileForm()
  • shortCutLink()
  • openInNewWindowLink()
  • languageSwitch()
  • localizationRedirect()
  • getLanguages()
  • fixWSversioningInEditConf()
  • getRecordForEdit()
  • compileStoreDat()
  • getNewIconMode()
  • closeDocument()
  • setDocument()

Two slots retrieve a parent object that will throw deprecation warnings if properties are read or methods are called. They receive a ServerRequestInterface $request argument as second argument instead:

  • TYPO3\CMS\Backend\Controller\EditDocumentController::preInitAfter
  • TYPO3\CMS\Backend\Controller\EditDocumentController::preInit


Calling one of the above methods or accessing one of the above properties on an instance of EditDocumentController will throw a deprecation warning in v9 and a PHP fatal in v10.

Affected Installations

The extension scanner will find most usages, but may also find some false positives. The most common property and method names like $data are not registered and will not be found if an extension uses that on an instance of EditDocumenController. In general all extensions that set properties or call methods except mainAction() are affected.

Installations may alse be affected, if the two signals TYPO3\CMS\Backend\Controller\EditDocumentController::preInitAfter and TYPO3\CMS\Backend\Controller\EditDocumentController::InitAfter are used and the slot write to or reads from first argument "parent object".


In general, extensions should not instantiate and re-use controllers of the core. Existing usages should be rewritten to be free of calls like these. Registered slots for the two signals preInitAfter and initAfter should read (not write!) from new second argument $request instead. Slots that currently write to "parent object" should instead be turned into a PSR-15 middleware to manipulate $request before EditDocumentController is called.