Bug #46067
closedImage rendering fails when using 'image' or 'media' field with own CEs (CType)
100%
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';
Updated by Stefan Galinski over 11 years ago
Sounds like you already discovered a solution. Can you please provide a patch and push it to our review system on http://review.typo3.org. You will find some guidance in the TYPO3 wiki: http://wiki.typo3.org/Contribution_Walkthrough_Tutorials.
Updated by Tobias Wollender over 11 years ago
Hi,
I created a simple test extension with a teaser element.
https://github.com/tliegl/contentelements
Install the extension, create a teaser element and add an image.
In the <f:debug> output you can see, that all information for images are empty (imagecaption, altText, titleText, image_link) and "image" just contains the count of images in the element.
If you add the CType of the element (contentelements_teaser) to the array in typo3/sysext/core/Classes/Resource/Service/FrontendContentAdapterService.php all fields get filled again.
'types' => array('image', 'textpic', 'contentelements_teaser'),
I hope this helps! :)
Thanks,
Tobi
Updated by Christian Bernet over 11 years ago
With 6.0.5 for us this bug is fixed.
thanks, christian
Updated by Robert Böing over 11 years ago
How did you fix it. What I need to do, to configure my own extension?
Updated by Tobias Wollender over 11 years ago
In my extension I solved it with an own fal viewhelper now. You can see the solution in this little extension: https://github.com/tliegl/contentelements
Updated by Gerrit Code Review about 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23360
Updated by Gerrit Code Review almost 11 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/23360
Updated by Gerrit Code Review over 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/23360
Updated by Alexander Stehlik over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 99ddf6dc2c58199c30cbb22c609ed75ab7748752.