Project

General

Profile

Bug #90170

Updated by Christian Eßl over 4 years ago

*As an example we have here:* 
 * a custom content element "Slider" (*tt_content*) 
 * This "Slider" have 1:n inline records of type "Slider-Item" (*tx_theme_domain_model_slideritem*) 
 * Those "Slider-Items" again have 1:n inline records of type "File Reference" (*sys_file_reference*) 

 How these look in the TCA: 
 <pre><code class="php"> 
 // Configuration/TCA/Overrides/tt_content.php  
 'tx_theme_slider' => [ 
             'exclude' => 0, 
             'label'     => $themeBeLanguageFilePrefix.'tt_content.tx_theme_slider', 
             'config'    => [ 
                 'type'            => 'inline', 
                 'foreign_table' => 'tx_theme_slider_item', 
                 'foreign_field' => 'tt_content', 
                 'appearance'      => [ 
                     'useSortable'                       => true, 
                     'showSynchronizationLink'           => true, 
                     'showAllLocalizationLink'           => true, 
                     'showPossibleLocalizationRecords' => true, 
                     'showRemovedLocalizationRecords'    => false, 
                     'expandSingle'                      => true, 
                     'enabledControls'                   => [ 
                         'localize' => true, 
                     ], 
                 ], 
                 'behaviour' => [ 
                     'mode' => 'select', 
                 ], 
                 'maxitems' => 20, 
             ], 
         ], 
 </code></pre> 


 <pre><code class="php"> 
 // Configuration/TCA/tx_theme_slider_item.php  
 'media' => [ 
             'label'    => $ll.'tx_theme_slider_item.media', 
             'config' => TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( 
                 'media', 
                 [ 
                     'maxitems' => 999, 
                     'minitems' => 0, 
                 ], 
                 $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] 
             ), 
         ], 
 </code></pre> 


 *Now the setup:* 
 * Site config with languages "default" and "german" 
 * An editor with edit permissions only for "german" 
 * The editor has edit permissions configured for tt_content and sys_file_reference, but NOT for tx_theme_domain_model_slideritem 
 * Now we create a content element "Slider", add some "Slider Items" as inline relations, those slider items again get some media file references as inline relations. 
 * Now log in as the editor and translate the slider element to "german". 

 *Expected result:* 
 * Content element is translated 
 * no slider items translations are created (because the editor has no permissions for them) 
 * no file references are created. (because those are connected to the tx_theme_domain_model_slideritem record) 

 *Actual result:* 
 * The content element is translated.  
 * no slider items translations are created (correct) 
 * File references are created (*wrong*) (wrong) 

 This translation made by the editor now leaves us with orphan translated sys_file_references, that have no tx_theme_domain_model_slideritem, they are connected to. Those will now instead be shown in the default translation of the slideritem. (leaving us with duplicated file references) 
 It looks like the DataHandler ignores this case: If a record is not translatable, its 1:n children of other tables should NOT be translated as well.

Back