Project

General

Profile

Actions

Bug #46067

closed

Image rendering fails when using 'image' or 'media' field with own CEs (CType)

Added by Tilo Baller about 11 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-03-06
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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';


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #45415: Content adapter sets imagecaption of media field instead of image fieldClosed2013-02-12

Actions
Related to TYPO3 Core - Bug #46090: Contentobject data Image/Link broken or missingClosed2013-03-07

Actions
Actions #1

Updated by Stefan Galinski about 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.

Actions #2

Updated by Tobias Wollender almost 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

Actions #3

Updated by Christian Bernet almost 11 years ago

With 6.0.5 for us this bug is fixed.
thanks, christian

Actions #4

Updated by Robert Böing almost 11 years ago

How did you fix it. What I need to do, to configure my own extension?

Actions #5

Updated by Tobias Wollender almost 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

Actions #6

Updated by Gerrit Code Review over 10 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

Actions #7

Updated by Gerrit Code Review over 10 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

Actions #8

Updated by Gerrit Code Review about 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

Actions #9

Updated by Alexander Stehlik about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #10

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF