Deprecation: #105076 - Plugin content element and plugin sub types
See forge#105076
Description
Historically, plugins have been registered using the list
content
element and the plugin subtype list_
field. This functionality
has been kept for backwards compatibility reasons. However, since the release
of TYPO3 v12.4, the recommended way to create a plugin is by using a dedicated
content type (CType
) for each plugin.
This old "General Plugin" approach has always been ugly from a UX perspective point of view since it hides plugin selection behind "General plugin" content element, forcing a second selection step and making such plugins something special.
Therefore, the plugin content element (list
) and the plugin sub types
field (
list_
) have been marked as deprecated in TYPO3 v13.4 and will
be removed in TYPO3 v14.0.
Additionally, the related PHP constant
TYPO3\
has been
deprecated as well.
Impact
Plugins added using
TYPO3\
where
the second parameter is
list_
(which is still the default) will
trigger a deprecation level log entry in TYPO3 v13 and will fail in v14.
Therefore, the same applies on using
TYPO3\
(to
configure the plugin for frontend rendering), where no fifth parameter is
provided or where the fifth parameter is
list_
(
Extension
), which is still the default.
The extension scanner will report any usage of
configure
,
where less than the required five arguments are provided. Actually, the
only valid value for the fifth parameter
$plugin
is
CType
,
for which the
Extension
constant
can be used.
Note
add
is also internally called when registering a plugin
via
TYPO3\
.
In that case the plugin type to use is either the one defined via
TYPO3\
or also falls back to
list_
.
Affected installations
Extensions registering plugins as list_
plugin sub type.
Migration
Existing plugins must be migrated to use the CType
record type.
Extension authors must implement the following changes:
- Register plugins using the
CType
record type - Create update wizard which extends
\TYPO3\
and addCMS\ Install\ Updates\ Abstract List Type To CType Update list_
totype CType
mapping for each plugin to migrate. The migration wizard for indexed_search in classIndexed
can be used as reference example.Search CType Migration - Migrate possible FlexForm registration and add dedicated
showitem
TCA configuration - Migrate possible PreviewRenderer registration in TCA
- Adapt possible content element wizard items in Page TSConfig, where
list_
is usedtype - Adapt possible content element restrictions in backend layouts or container elements defined by third-party extensions like ichhabrecht/content-defender .
Common example
// Before
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['my_plugin'] = 'pi_flexform';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['my_plugin'] = 'pages,layout,recursive';
// After
$GLOBALS['TCA']['tt_content']['types']['my_plugin']['showitem'] = '<Some Fields>,pi_flexform,<Other Fields>';