Project

General

Profile

Bug #88519

Updated by DMK E-BUSINESS GmbH almost 5 years ago

References in flexforms having type=inline are not processed correctly 
 during translations in workspaces as the remapping is not done. It's only done for group and select fields inside the flexform.  

 When a content element is translated in a draft workspace containing FAL references in a flexform inline field the references of the translation gets get's moved to the content element record with default language upon publishing. As long as the content elements records are in the draft draf workspace everything is fine.  
 This is due to the fact that the file reference of the new place holder version (t3ver_state = -1) of the translated content element record is pointing to the content element record (uid_foreign) in the default language. The value of uid_foreign for the draft version reference is correct. 

 Steps to reproduce: 
 1. Add an extension with a plugin and a flexform for that plugin.  
 
 2. Add an inline image field in flexform like the following: 
 <pre> 
 <image> 
	 <TCEforms> 
	     <label>Add image</label> 
	     <config> 
		 <type>inline</type> 
		 <appearance type="array"> 
		     <createNewRelationLinkTitle>Image</createNewRelationLinkTitle> 
		     <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_field>uid_foreign</foreign_field> 
		 <foreign_label>uid_local</foreign_label> 
		 <foreign_match_fields type="array"> 
		     <fieldname>galleryImage</fieldname> 
		 </foreign_match_fields> 
		 <foreign_selector>uid_local</foreign_selector> 
		 <foreign_selector_fieldTcaOverride type="array"> 
		     <config type="array"> 
		         <appearance type="array"> 
		             <elementBrowserAllowed>jpg,jpeg,png,gif,svg</elementBrowserAllowed> 
		             <elementBrowserType>file</elementBrowserType> 
		         </appearance> 
		    </config> 
		 </foreign_selector_fieldTcaOverride> 
		 <foreign_sortby>sorting_foreign</foreign_sortby> 
		 <foreign_table>sys_file_reference</foreign_table> 
		 <foreign_table_field>tablenames</foreign_table_field> 
		 <foreign_types type="array"> 
		     <numIndex index="0" type="array"> 
		         <showitem>--palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette</showitem> 
		     </numIndex> 
		     <numIndex index="1" type="array"> 
		         <showitem>--palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette</showitem> 
		     </numIndex> 
		     <numIndex index="2" type="array"> 
		         <showitem>--palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette</showitem> 
		     </numIndex> 
		     <numIndex index="3" type="array"> 
		         <showitem>--palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette</showitem> 
		     </numIndex> 
		     <numIndex index="4" type="array"> 
		         <showitem>--palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette</showitem> 
		     </numIndex> 
		     <numIndex index="5" type="array"> 
		         <showitem>--palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette</showitem> 
		     </numIndex> 
		 </foreign_types> 
		 <maxitems>1</maxitems> 
		 <minitems>0</minitems> 
	     </config> 
	 </TCEforms> 
 </image> 
 </pre> 
 3. Set up workspaces to have at least a draft workspace. 
 4. Switch to non-live workspace and create a plugin record for the default language. 
 5. 4. Add an image reference. 
 6. 5. Translate the record. At this point everything looks okay. But in the database the new version placeholder (t3ver_state = -1) of the translated file reference (sys_file_reference) points to the plugin record in the default language not to the record in the translated language. The file reference record for the draft workspace version points to the correct record. 
 7. Publish changes to live. The file references of the translated plugin record get moved to the default plugin record leaving the translation without references and the default record with 2 references. 

 I hope I explained it well enough to understand the problem. 

 Can also be reproduced with the gridelements extension. If there is a container with inline FAL references this happens, too. 

 P.S. I found the solution through the issue #59664 as there seemed to be a similar problem.

Back