[BUGFIX] Always merge results from empty tabs 74/64874/3
authorHelmut Hummel <typo3@helhum.io>
Thu, 11 Jun 2020 09:44:43 +0000 (11:44 +0200)
committerBenni Mack <benni@typo3.org>
Thu, 9 Jul 2020 12:44:05 +0000 (14:44 +0200)
When rendering child elements of a tabs, not only
the rendered HTML is collected from these child elements,
but also hidden fields HTML, assets and a lot more.

Therefore it is crucial to merge the child results regardless
of whether the "html" property is empty.

Releases: master, 10.4, 9.5
Resolves: #91636
Relates: #89094
Change-Id: If169bd6486d3001466464462b29788b94fbb0943

typo3/sysext/backend/Classes/Form/Container/FlexFormTabsContainer.php
typo3/sysext/backend/Classes/Form/Container/TabsContainer.php

index e154ab5..609d3ca 100644 (file)
@@ -104,9 +104,8 @@ class FlexFormTabsContainer extends AbstractContainer
                     'description' => trim($sheetDataStructure['ROOT']['sheetDescription']) ? $languageService->sL(trim($sheetDataStructure['ROOT']['sheetDescription'])) : '',
                     'linkTitle' => trim($sheetDataStructure['ROOT']['sheetShortDescr']) ? $languageService->sL(trim($sheetDataStructure['ROOT']['sheetShortDescr'])) : '',
                 ];
-
-                $resultArray = $this->mergeChildReturnIntoExistingResult($resultArray, $childReturn, false);
             }
+            $resultArray = $this->mergeChildReturnIntoExistingResult($resultArray, $childReturn, false);
         }
 
         $fieldInformationResult = $this->renderFieldInformation();
index 365ba0d..2742ab5 100644 (file)
@@ -91,8 +91,8 @@ class TabsContainer extends AbstractContainer
                     'label' => $tabWithLabelAndElements['label'],
                     'content' => $childArray['html'],
                 ];
-                $resultArray = $this->mergeChildReturnIntoExistingResult($resultArray, $childArray, false);
             }
+            $resultArray = $this->mergeChildReturnIntoExistingResult($resultArray, $childArray, false);
         }
 
         $resultArray['html'] = $this->renderTabMenu($tabElements, $domIdPrefix);