Actions
Bug #82249
closedCache problems on flexform when using "Content from pid" feature
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2017-08-30
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:
Description
Hi,
On TYPO 8.7.4, i have a page X which renders the content of another page Y (field content_from_pid).
On page Y i have a content with a flexform and two fields (text and image), as shown below.
When I edit this content on TYPO3, the page X shows the image changed but the text unchanged.
Page Y shows both changed.
Using ?no_cache=1 on X shows both changed.
So, it looks like TYPO3 is making cache of the flexform, but only in the page X.
The image changes on frontend because it is retrieved from the database (as the flexform contains only the number '1' and not the image or reference uids).
I get the image using these lines of code:
$fileRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\FileRepository');
$image = $fileRepository->findByRelation('tt_content', 'featured_image', $contentUid);
Here's the flexform i'm using.
<sFEATUREDNEWS>
<ROOT>
<TCEforms>
<sheetTitle>Featured News</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<title>
<TCEforms>
<label>Title</label>
<config>
<type>input</type>
<size>48</size>
<eval>trim</eval>
</config>
</TCEforms>
</title>
<featured_image>
<TCEforms>
<label>Image</label>
<config>
<type>inline</type>
<appearance type="array">
<enabledControls type="array">
<delete>1</delete>
<dragdrop>1</dragdrop>
<hide>1</hide>
<info>1</info>
<localize>1</localize>
</enabledControls>
<headerThumbnail type="array">
<field>uid_local</field>
<height>45c</height>
<width>45</width>
</headerThumbnail>
<useSortable>1</useSortable>
</appearance>
<behaviour type="array">
<localizationMode>select</localizationMode>
<localizeChildrenAtParentLocalization>1</localizeChildrenAtParentLocalization>
</behaviour>
<filter type="array">
</filter>
<foreign_types type="array">
<numIndex index="2" type="array">
<showitem>--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette</showitem>
</numIndex>
</foreign_types>
<foreign_table>sys_file_reference</foreign_table>
<foreign_sortby>sorting_foreign</foreign_sortby>
<foreign_table_field>tablenames</foreign_table_field>
<foreign_field>uid_foreign</foreign_field>
<foreign_label>uid_local</foreign_label>
<foreign_match_fields type="array">
<fieldname>featured_image</fieldname>
</foreign_match_fields>
<foreign_selector>uid_local</foreign_selector>
<foreign_selector_fieldTcaOverride type="array">
<config type="array">
<appearance type="array">
<elementBrowserAllowed>gif,jpg,jpeg,png</elementBrowserAllowed>
<elementBrowserType>file</elementBrowserType>
</appearance>
</config>
</foreign_selector_fieldTcaOverride>
<maxitems>1</maxitems>
<minitems>0</minitems>
</config>
</TCEforms>
</featured_image>
</el>
</ROOT>
</sFEATUREDNEWS>
Cheers
Files
Actions