Deprecation: #69754 - Deprecate relative path to extension directory and using filename only in TCA ctrl iconfile
See forge#69754
Description
- Using relative paths to refer to the extension directory for iconfiles in
TCA
has been marked as deprecated.['ctrl'] ['iconfile'] - Using filenames only to refer to an iconfile in TCA['ctrl'] has been marked as deprecated.
Impact
- TCA definitions in
TCA
containing['ctrl'] ['iconfile'] '../
or calls totypo3conf/ ext/' \TYPO3\
will trigger a deprecation log entry.CMS\ Core\ Utility\ Extension Management Utility:: ext Rel Path () - TCA definitions in
TCA
containing a filename only will trigger a deprecation log entry.['ctrl'] ['iconfile']
Affected Installations
Any installation with extensions defining TCA
by using ../
or only a filename.
Migration
Relative paths
Use EXT:
instead of relative path '../
or \TYPO3\
, e.g.
'ctrl' => array(
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('my_extension') . 'Resources/Public/Icons/image.png'
),
Copied!
has to be migrated to
'ctrl' => array(
'iconfile' => 'EXT:my_extension/Resources/Public/Icons/image.png'
),
Copied!
Filename only
Use a full absolute path or an EXT:
definition instead of a filename only:
'ctrl' => array(
'iconfile' => '_icon_ftp.gif'
),
Copied!
has to be migrated to
'ctrl' => array(
'iconfile' => 'EXT:t3skin/icons/gfx/i/_icon_ftp.gif'
),
Copied!
or
'ctrl' => array(
// You can use absolute paths (to your web root folder) to the icons but
// it is discouraged to do so as these icons belong to an extension they
// should also be stored in this extension
'iconfile' => '/fileadmin/icons/_icon_ftp.gif'
),
Copied!