Bug #82249
closedCache problems on flexform when using "Content from pid" feature
100%
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
Updated by Olaf Schmidt-Wischhöfer about 5 years ago
- File 82249-content-from-pid-typo3-9.diff 82249-content-from-pid-typo3-9.diff added
- File 82249-content-from-pid-typo3-8.diff 82249-content-from-pid-typo3-8.diff added
- File 82249-content-from-pid-master.diff 82249-content-from-pid-master.diff added
- Category set to Frontend
- TYPO3 Version changed from 8 to 10
I have attached patches that fix this issue for various branches.
Updated by Olaf Schmidt-Wischhöfer about 5 years ago
- Related to Bug #59411: Forward: Clear cache for pages content_from_pid added
Updated by Olaf Schmidt-Wischhöfer about 5 years ago
- Related to Bug #18534: The cache of pages which include content from another one is not emptied automatically when source content is edited added
Updated by Gerrit Code Review over 4 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63531
Updated by Benni Mack over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 2758aa4faac27ed6ba5fb5eb4b957436a5ba0803.
Updated by Gerrit Code Review over 4 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63536
Updated by Georg Ringer over 4 years ago
- Status changed from Under Review to Resolved
Applied in changeset 410c35f9d0bf2fe0e834aad0709e7c0884c8aed3.
Updated by Benni Mack over 4 years ago
- Related to Bug #18534: The cache of pages which include content from another one is not emptied automatically when source content is edited added