#46067Image rendering fails when using 'image' or 'media' field with own CEs (CType)
Description
The Bugfix #45415 breaks image rendering for custom content elements which reuse the fields ‘image’ or ‘media’ for own storage of media references.
We use custom content elements similiar to this definition:
$TCA['tt_content']['types']['tx_abc_ce_teaser'] = array('showitem' => 'header,image,tx_abc_ce_customfield1,tx_abc_ce_customfield2,tx_abc_ce_customfieldn');
It could be fixed by extending the $migrateFields variable defined in FrontendContentAdapterService:39:
static protected $migrateFields = array(
'tt_content' => array(
'image' => array(
'paths' => 'image',
'titleTexts' => 'titleText',
'captions' => 'imagecaption',
'links' => 'image_link',
'alternativeTexts' => 'altText',
'__typeMatch' => array(
'typeField' => 'CType',
'types' => array('image', 'textpic'),
)
),
[...]
),
[...]
);
May be it can be moved to DefaultConfiguration so we can extend it like that:
$GLOBALS['TYPO3_CONF_VARS'['FE']['migrateFields']['tt_content']['image']['typeMatch']['types'][] = 'tx_abc_ce_teaser';