From 8f64dc55bd3c8533a3e9379790407efea38edb72 Mon Sep 17 00:00:00 2001 From: Benni Mack <benni@typo3.org> Date: Sun, 8 Oct 2017 17:59:23 +0200 Subject: [PATCH] [!!!][TASK] IRRE: Always consider "localizeChildrenAtParentLocalization" The TCA Inline behaviour option "localizeChildrenAtParentLocalization" is dropped. This functionality is now always enabled. A TCA migration wizard is removing the option. On a side note, the removed functional tests when removing "localizationMode=select" were re-added. Resolves: #82709 Releases: master Change-Id: Idad3443417bf08fc4c93fa6475079ac2fd779c1e Reviewed-on: https://review.typo3.org/54326 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Susanne Moog <susanne.moog@typo3.org> Tested-by: Susanne Moog <susanne.moog@typo3.org> Reviewed-by: Daniel Gorges <daniel.gorges@b13.de> Tested-by: Daniel Gorges <daniel.gorges@b13.de> Reviewed-by: Benni Mack <benni@typo3.org> Tested-by: Benni Mack <benni@typo3.org> --- .../core/Classes/DataHandling/DataHandler.php | 38 +++++--------- .../core/Classes/Migrations/TcaMigration.php | 40 +++++++++++++++ .../Utility/ExtensionManagementUtility.php | 5 +- ...izeChildrenAtParentLocalizationRemoved.rst | 38 ++++++++++++++ .../IRRE/CSV/AbstractActionTestCase.php | 21 +++++++- .../IRRE/CSV/Modify/ActionTest.php | 34 +++++++++++++ .../DataSet/copyParentContentToLanguage.csv | 28 ++++++++++ .../localizeParentContentWAllChildren.csv | 28 ++++++++++ .../ForeignField/AbstractActionTestCase.php | 45 +++++++--------- .../IRRE/ForeignField/Modify/ActionTest.php | 51 +++++++++++++------ ...opyParentContentToLanguageWAllChildren.csv | 29 +++++++++++ ...ildrenHStandaloneChildrenLanguageSynch.csv | 31 ----------- .../localizeParentContentWAllChildren.csv | 29 +++++++++++ .../FlexForms/tt_content_flexform.xml | 3 -- .../TCA/Overrides/tt_content.php | 6 --- .../TCA/tx_irretutorial_1ncsv_hotel.php | 3 -- .../TCA/tx_irretutorial_1ncsv_offer.php | 3 -- .../TCA/tx_irretutorial_1nff_hotel.php | 3 -- .../TCA/tx_irretutorial_1nff_offer.php | 3 -- .../IRRE/CSV/Modify/ActionTest.php | 15 ++++++ .../localizeParentContentWAllChildren.csv | 32 ++++++++++++ .../IRRE/CSV/Publish/ActionTest.php | 16 ++++++ .../localizeParentContentWAllChildren.csv | 28 ++++++++++ .../IRRE/CSV/PublishAll/ActionTest.php | 16 ++++++ .../localizeParentContentWAllChildren.csv | 28 ++++++++++ .../IRRE/ForeignField/Modify/ActionTest.php | 15 ++++++ .../localizeParentContentWAllChildren.csv | 33 ++++++++++++ .../IRRE/ForeignField/Publish/ActionTest.php | 16 ++++++ .../localizeParentContentWAllChildren.csv | 29 +++++++++++ .../ForeignField/PublishAll/ActionTest.php | 16 ++++++ .../localizeParentContentWAllChildren.csv | 29 +++++++++++ 31 files changed, 585 insertions(+), 126 deletions(-) create mode 100644 typo3/sysext/core/Documentation/Changelog/master/Breaking-82709-TCAOptionLocalizeChildrenAtParentLocalizationRemoved.rst create mode 100644 typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToLanguage.csv create mode 100644 typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildren.csv create mode 100644 typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToLanguageWAllChildren.csv delete mode 100644 typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/locChildrenHStandaloneChildrenLanguageSynch.csv create mode 100644 typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildren.csv create mode 100644 typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildren.csv create mode 100644 typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContentWAllChildren.csv create mode 100644 typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContentWAllChildren.csv create mode 100644 typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildren.csv create mode 100644 typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentWAllChildren.csv create mode 100644 typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentWAllChildren.csv diff --git a/typo3/sysext/core/Classes/DataHandling/DataHandler.php b/typo3/sysext/core/Classes/DataHandling/DataHandler.php index 45135366cc1f..5a443bd198ad 100644 --- a/typo3/sysext/core/Classes/DataHandling/DataHandler.php +++ b/typo3/sysext/core/Classes/DataHandling/DataHandler.php @@ -3159,9 +3159,7 @@ class DataHandler */ protected function checkValue_inline_processDBdata($valueArray, $tcaFieldConf, $id, $status, $table, $field, array $additionalData = null) { - $newValue = ''; $foreignTable = $tcaFieldConf['foreign_table']; - $transOrigPointer = 0; $valueArray = $this->applyFiltersToValues($tcaFieldConf, $valueArray); // Fetch the related child records using \TYPO3\CMS\Core\Database\RelationHandler /** @var $dbAnalysis RelationHandler */ @@ -3174,17 +3172,15 @@ class DataHandler // update record in intermediate table (sorting & pointer uid to parent record) $dbAnalysis->writeForeignField($tcaFieldConf, $id, 0, $skipSorting); $newValue = $dbAnalysis->countItems(false); + } elseif ($this->getInlineFieldType($tcaFieldConf) === 'mm') { + // In order to fully support all the MM stuff, directly call checkValue_group_select_processDBdata instead of repeating the needed code here + $valueArray = $this->checkValue_group_select_processDBdata($valueArray, $tcaFieldConf, $id, $status, 'select', $table, $field); + $newValue = $valueArray[0]; } else { - if ($this->getInlineFieldType($tcaFieldConf) === 'mm') { - // In order to fully support all the MM stuff, directly call checkValue_group_select_processDBdata instead of repeating the needed code here - $valueArray = $this->checkValue_group_select_processDBdata($valueArray, $tcaFieldConf, $id, $status, 'select', $table, $field); - $newValue = $valueArray[0]; - } else { - $valueArray = $dbAnalysis->getValueArray(); - // Checking that the number of items is correct: - $valueArray = $this->checkValue_checkMax($tcaFieldConf, $valueArray); - $newValue = $this->castReferenceValue(implode(',', $valueArray), $tcaFieldConf); - } + $valueArray = $dbAnalysis->getValueArray(); + // Checking that the number of items is correct: + $valueArray = $this->checkValue_checkMax($tcaFieldConf, $valueArray); + $newValue = $this->castReferenceValue(implode(',', $valueArray), $tcaFieldConf); } return $newValue; } @@ -3861,13 +3857,11 @@ class DataHandler $prependName = $conf['type'] === 'group' ? $conf['prepend_tname'] : ''; $mmTable = isset($conf['MM']) && $conf['MM'] ? $conf['MM'] : ''; $localizeForeignTable = isset($conf['foreign_table']) && BackendUtility::isTableLocalizable($conf['foreign_table']); - $localizeReferences = $localizeForeignTable && isset($conf['localizeReferencesAtParentLocalization']) && $conf['localizeReferencesAtParentLocalization']; - $localizeChildren = $localizeForeignTable && isset($conf['behaviour']['localizeChildrenAtParentLocalization']) && $conf['behaviour']['localizeChildrenAtParentLocalization']; + // Localize referenced records of select fields: + $localizingNonManyToManyFieldReferences = empty($mmTable) && $localizeForeignTable && isset($conf['localizeReferencesAtParentLocalization']) && $conf['localizeReferencesAtParentLocalization']; /** @var $dbAnalysis RelationHandler */ $dbAnalysis = $this->createRelationHandlerInstance(); $dbAnalysis->start($value, $allowedTables, $mmTable, $uid, $table, $conf); - // Localize referenced records of select fields: - $localizingNonManyToManyFieldReferences = $localizeReferences && empty($mmTable); $purgeItems = false; if ($language > 0 && $localizingNonManyToManyFieldReferences) { foreach ($dbAnalysis->itemArray as $index => $item) { @@ -3876,11 +3870,7 @@ class DataHandler if ($recordLocalization) { $dbAnalysis->itemArray[$index]['id'] = $recordLocalization[0]['uid']; } elseif ($this->isNestedElementCallRegistered($item['table'], $item['id'], 'localize') === false) { - if ($localizingNonManyToManyFieldReferences || $localizeChildren) { - $dbAnalysis->itemArray[$index]['id'] = $this->localize($item['table'], $item['id'], $language); - } else { - unset($dbAnalysis->itemArray[$index]); - } + $dbAnalysis->itemArray[$index]['id'] = $this->localize($item['table'], $item['id'], $language); } } $purgeItems = true; @@ -3934,10 +3924,8 @@ class DataHandler $newId = null; // If language is set and differs from original record, this isn't a copy action but a localization of our parent/ancestor: if ($language > 0 && BackendUtility::isTableLocalizable($table) && $language != $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']]) { - // If children should be localized when the parent gets localized the first time, just do it: - if (isset($conf['behaviour']['localizeChildrenAtParentLocalization']) && $conf['behaviour']['localizeChildrenAtParentLocalization']) { - $newId = $this->localize($v['table'], $v['id'], $language); - } + // Children should be localized when the parent gets localized the first time, just do it: + $newId = $this->localize($v['table'], $v['id'], $language); } else { if (!MathUtility::canBeInterpretedAsInteger($realDestPid)) { $newId = $this->copyRecord($v['table'], $v['id'], -$v['id']); diff --git a/typo3/sysext/core/Classes/Migrations/TcaMigration.php b/typo3/sysext/core/Classes/Migrations/TcaMigration.php index ed5c6fde71d6..5699e8834eb6 100644 --- a/typo3/sysext/core/Classes/Migrations/TcaMigration.php +++ b/typo3/sysext/core/Classes/Migrations/TcaMigration.php @@ -87,6 +87,7 @@ class TcaMigration $tca = $this->migrateImageManipulationConfig($tca); $tca = $this->migrateinputDateTimeMax($tca); $tca = $this->migrateInlineOverrideChildTca($tca); + $tca = $this->migrateLocalizeChildrenAtParentLocalization($tca); return $tca; } @@ -2505,4 +2506,43 @@ class TcaMigration return $tca; } + + /** + * Option $TCA[$table]['columns'][$columnName]['config']['behaviour']['localizeChildrenAtParentLocalization'] + * is always on, so this option can be removed. + * + * @param array $tca + * @return array the modified TCA structure + */ + protected function migrateLocalizeChildrenAtParentLocalization(array $tca): array + { + foreach ($tca as $table => &$tableDefinition) { + if (!isset($tableDefinition['columns']) || !is_array($tableDefinition['columns'])) { + continue; + } + foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) { + if (($fieldConfig['config']['type'] ?? null) !== 'inline') { + continue; + } + + $localizeChildrenAtParentLocalization = ($fieldConfig['config']['behaviour']['localizeChildrenAtParentLocalization'] ?? null); + if ($localizeChildrenAtParentLocalization === null) { + continue; + } + + if ($localizeChildrenAtParentLocalization) { + $this->messages[] = 'The TCA setting \'localizeChildrenAtParentLocalization\' is deprecated ' + . ' and should be removed from TCA for ' . $table . '[\'columns\']' + . '[\'' . $fieldName . '\'][\'config\'][\'behaviour\'][\'localizeChildrenAtParentLocalization\']'; + } else { + $this->messages[] = 'The TCA setting \'localizeChildrenAtParentLocalization\' is deprecated ' + . ', as this functionality is always enabled. The option should be removed from TCA for ' + . $table . '[\'columns\'][\'' . $fieldName . '\'][\'config\'][\'behaviour\']' + . '[\'localizeChildrenAtParentLocalization\']'; + } + unset($fieldConfig['config']['behaviour']['localizeChildrenAtParentLocalization']); + } + } + return $tca; + } } diff --git a/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php b/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php index 739534295803..debe42abe129 100644 --- a/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php +++ b/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php @@ -576,10 +576,7 @@ class ExtensionManagementUtility 'hide' => true, 'delete' => true, ], - ], - 'behaviour' => [ - 'localizeChildrenAtParentLocalization' => true, - ], + ] ]; ArrayUtility::mergeRecursiveWithOverrule($fileFieldTCAConfig, $customSettingOverride); return $fileFieldTCAConfig; diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-82709-TCAOptionLocalizeChildrenAtParentLocalizationRemoved.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-82709-TCAOptionLocalizeChildrenAtParentLocalizationRemoved.rst new file mode 100644 index 000000000000..22a9af9053c1 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-82709-TCAOptionLocalizeChildrenAtParentLocalizationRemoved.rst @@ -0,0 +1,38 @@ +.. include:: ../../Includes.txt + +============================================================================ +Breaking: #82709 - TCA option "localizeChildrenAtParentLocalization" removed +============================================================================ + +See :issue:`82709` + +Description +=========== + +The TCA option `$TCA[$tableName]['columns'][$columnName]['config']['behaviour']['localizeChildrenAtParentLocalization']` +has been removed, as this is the default behaviour for any kind of inline translation (IRRE). + +The behaviour to disable this functionality in TYPO3 v8 was not compatible anymore with any +localization mode setting and the newly introduced `allowLanguageSynchronization`. + + +Impact +====== + +Explicitly disabling this option has no effect anymore, setting this option in TCA will +trigger a deprecation message. + + +Affected Installations +====================== + +Any installation with custom TCA definitions of Inline Relational Record Editing which have this +setting set. + + +Migration +========= + +Remove the TCA option in the extensions' TCA definition. + +.. index:: TCA, NotScanned \ No newline at end of file diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/AbstractActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/AbstractActionTestCase.php index 18e1e470d3ca..61be40090d4d 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/AbstractActionTestCase.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/AbstractActionTestCase.php @@ -99,11 +99,28 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D $this->recordIds['newContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast]; } + /** + * @see DataSet/copyParentContentToLanguage.csv + * Should copy all children as well + */ + public function copyParentContentToLanguage() + { + $newTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId); + $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast]; + } + /** + * @see DataSet/localizeParentContentWAllChildren.csv + * Should localize all children as well + */ + public function localizeParentContentWithAllChildren() + { + $newTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId); + $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast]; + } + public function localizeParentContentWithLanguageSynchronization() { $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['allowLanguageSynchronization'] = true; - $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizeChildrenAtParentLocalization'] = true; - $GLOBALS['TCA'][self::TABLE_Hotel]['columns'][self::FIELD_HotelOffer]['config']['behaviour']['localizeChildrenAtParentLocalization'] = true; $newTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId); $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast]; $this->actionService->modifyRecords( diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php index 2656a299a91d..7b74765ce2c8 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php @@ -103,6 +103,40 @@ class ActionTest extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\ ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1')); } + /** + * @test + * @see DataSet/copyParentContentToLanguage.csv + */ + public function copyParentContentToLanguageWithAllChildren() + { + parent::copyParentContentToLanguage(); + $this->assertAssertionDataSet('copyParentContentToLanguage'); + + $this->setUpFrontendRootPage(1, [ + 'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.ts', + 'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRendererNoOverlay.ts' + ]); + $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections(); + $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint() + ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['localizedContentId'])->setRecordField(self::FIELD_ContentHotel) + ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1')); + } + + /** + * @test + * @see DataSet/localizeParentContentWAllChildren.csv + */ + public function localizeParentContentWithAllChildren() + { + parent::localizeParentContentWithAllChildren(); + $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + + $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections(); + $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint() + ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel) + ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1')); + } + /** * @test * @see DataSet/localizeParentContentLanguageSynchronization.csv diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToLanguage.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToLanguage.csv new file mode 100644 index 000000000000..8f6125a0aa63 --- /dev/null +++ b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/copyParentContentToLanguage.csv @@ -0,0 +1,28 @@ +tt_content,,,,,,,,,,,,,, +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1ncsv_hotels +,297,89,256,0,0,0,0,0,0,0,0,0,Regular Element #1,"3,4" +,298,89,512,0,0,0,0,0,0,0,0,0,Regular Element #2,5 +,299,89,768,0,1,0,298,0,0,0,0,0,[Translate to Dansk:] Regular Element #2,6 +tx_irretutorial_1ncsv_hotel,,,,,,,,,,,,,, +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers +,3,89,256,0,0,0,0,0,0,0,0,0,Hotel #1,"5,6" +,4,89,128,0,0,0,0,0,0,0,0,0,Hotel #2,7 +,5,89,64,0,0,0,0,0,0,0,0,0,Hotel #1,8 +,6,89,96,0,1,0,5,0,0,0,0,0,[Translate to Dansk:] Hotel #1,9 +tx_irretutorial_1ncsv_offer,,,,,,,,,,,,,, +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices +,5,89,256,0,0,0,0,0,0,0,0,0,Offer #1.1,"7,8,9" +,6,89,128,0,0,0,0,0,0,0,0,0,Offer #1.2,"10,11" +,7,89,64,0,0,0,0,0,0,0,0,0,Offer #2.1,12 +,8,89,32,0,0,0,0,0,0,0,0,0,Offer #1.1,13 +,9,89,48,0,1,0,8,0,0,0,0,0,[Translate to Dansk:] Offer #1.1,14 +tx_irretutorial_1ncsv_price,,,,,,,,,,,,,, +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title, +,7,89,256,0,0,0,0,0,0,0,0,0,Price #1.1.1, +,8,89,128,0,0,0,0,0,0,0,0,0,Price #1.1.2, +,9,89,64,0,0,0,0,0,0,0,0,0,Price #1.1.3, +,10,89,32,0,0,0,0,0,0,0,0,0,Price #1.2.1, +,11,89,16,0,0,0,0,0,0,0,0,0,Price #1.2.2, +,12,89,8,0,0,0,0,0,0,0,0,0,Price #2.1.1, +,13,89,4,0,0,0,0,0,0,0,0,0,Price #1.1.1, +,14,89,6,0,1,0,13,0,0,0,0,0,[Translate to Dansk:] Price #1.1.1, diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildren.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildren.csv new file mode 100644 index 000000000000..910dcd9a2204 --- /dev/null +++ b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildren.csv @@ -0,0 +1,28 @@ +"tt_content",,,,,,,,,,,,,, +,"uid","pid","sorting","deleted","sys_language_uid","l18n_parent","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","header","tx_irretutorial_1ncsv_hotels" +,297,89,256,0,0,0,0,0,0,0,0,0,"Regular Element #1","3,4" +,298,89,512,0,0,0,0,0,0,0,0,0,"Regular Element #2",5 +,299,89,768,0,1,298,298,0,0,0,0,0,"[Translate to Dansk:] Regular Element #2",6 +"tx_irretutorial_1ncsv_hotel",,,,,,,,,,,,,, +,"uid","pid","sorting","deleted","sys_language_uid","l18n_parent","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","title","offers" +,3,89,256,0,0,0,0,0,0,0,0,0,"Hotel #1","5,6" +,4,89,128,0,0,0,0,0,0,0,0,0,"Hotel #2",7 +,5,89,64,0,0,0,0,0,0,0,0,0,"Hotel #1",8 +,6,89,96,0,1,5,5,0,0,0,0,0,"[Translate to Dansk:] Hotel #1",9 +"tx_irretutorial_1ncsv_offer",,,,,,,,,,,,,, +,"uid","pid","sorting","deleted","sys_language_uid","l18n_parent","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","title","prices" +,5,89,256,0,0,0,0,0,0,0,0,0,"Offer #1.1","7,8,9" +,6,89,128,0,0,0,0,0,0,0,0,0,"Offer #1.2","10,11" +,7,89,64,0,0,0,0,0,0,0,0,0,"Offer #2.1",12 +,8,89,32,0,0,0,0,0,0,0,0,0,"Offer #1.1",13 +,9,89,48,0,1,8,8,0,0,0,0,0,"[Translate to Dansk:] Offer #1.1",14 +"tx_irretutorial_1ncsv_price",,,,,,,,,,,,,, +,"uid","pid","sorting","deleted","sys_language_uid","l18n_parent","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","t3ver_move_id","title", +,7,89,256,0,0,0,0,0,0,0,0,0,"Price #1.1.1", +,8,89,128,0,0,0,0,0,0,0,0,0,"Price #1.1.2", +,9,89,64,0,0,0,0,0,0,0,0,0,"Price #1.1.3", +,10,89,32,0,0,0,0,0,0,0,0,0,"Price #1.2.1", +,11,89,16,0,0,0,0,0,0,0,0,0,"Price #1.2.2", +,12,89,8,0,0,0,0,0,0,0,0,0,"Price #2.1.1", +,13,89,4,0,0,0,0,0,0,0,0,0,"Price #1.1.1", +,14,89,6,0,1,13,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1", diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/AbstractActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/AbstractActionTestCase.php index d29468bb17d3..fae8dcfdcb9a 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/AbstractActionTestCase.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/AbstractActionTestCase.php @@ -117,11 +117,8 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D */ public function localizeParentContentWithLanguageSynchronization() { - $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizeChildrenAtParentLocalization'] = false; $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['allowLanguageSynchronization'] = true; - $GLOBALS['TCA'][self::TABLE_Hotel]['columns'][self::FIELD_HotelOffer]['config']['behaviour']['localizeChildrenAtParentLocalization'] = false; $GLOBALS['TCA'][self::TABLE_Hotel]['columns'][self::FIELD_HotelOffer]['config']['behaviour']['allowLanguageSynchronization'] = true; - $GLOBALS['TCA'][self::TABLE_Offer]['columns'][self::FIELD_OfferPrice]['config']['behaviour']['localizeChildrenAtParentLocalization'] = false; $GLOBALS['TCA'][self::TABLE_Offer]['columns'][self::FIELD_OfferPrice]['config']['behaviour']['allowLanguageSynchronization'] = true; $newTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId); $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast]; @@ -133,8 +130,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D public function localizeParentContentChainLanguageSynchronizationSource() { $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['allowLanguageSynchronization'] = true; - $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizeChildrenAtParentLocalization'] = true; - $GLOBALS['TCA'][self::TABLE_Hotel]['columns'][self::FIELD_HotelOffer]['config']['behaviour']['localizeChildrenAtParentLocalization'] = true; $newTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId); $this->recordIds['localizedContentIdFirst'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast]; $newTableIds = $this->actionService->localizeRecord(self::TABLE_Content, $this->recordIds['localizedContentIdFirst'], self::VALUE_LanguageIdSecond); @@ -153,6 +148,24 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D ); } + /** + * @see DataSet/copyParentContentToLanguageWAllChildren.csv + */ + public function copyParentContentToLanguageWithAllChildren() + { + $newTableIds = $this->actionService->copyRecordToLanguage(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId); + $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast]; + } + + /** + * @see DataSet/localizeParentContentWAllChildren.csv + */ + public function localizeParentContentWithAllChildren() + { + $newTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId); + $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast]; + } + /** * @see DataSet/Modify/localizeParentContentNCreateNestedChildrenWLanguageSynchronization.csv */ @@ -188,28 +201,6 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D $this->recordIds['newPriceId'] = $this->actionService->getDataHandler()->substNEWwithIDs[$newPriceId]; } - public function localizeChildrenHavingStandaloneChildrenInSelectModeAndLanguageSynchronization() - { - $GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['allowLanguageSynchronization'] = true; - unset($GLOBALS['TCA'][self::TABLE_Content]['columns'][self::FIELD_ContentHotel]['config']['behaviour']['localizeChildrenAtParentLocalization']); - unset($GLOBALS['TCA'][self::TABLE_Hotel]['columns'][self::FIELD_HotelOffer]['config']['behaviour']['localizeChildrenAtParentLocalization']); - - $this->actionService->createNewRecords(self::VALUE_PageId, [ - self::TABLE_Hotel => ['title' => 'Hotel Standalone', 'parenttable' => 'tt_content'], - self::TABLE_Offer => ['title' => 'Offer Standalone', 'parenttable' => 'tt_content'], - ]); - - $newTableIds = $this->actionService->localizeRecord(self::TABLE_Content, self::VALUE_ContentIdLast, self::VALUE_LanguageId); - $this->recordIds['localizedContentId'] = $newTableIds[self::TABLE_Content][self::VALUE_ContentIdLast]; - $this->actionService->modifyRecords( - self::VALUE_PageId, - [ - self::TABLE_Content => ['uid' => self::VALUE_ContentIdLast, self::FIELD_ContentHotel => '5,__nextUid'], - self::TABLE_Hotel => ['uid' => '__NEW', 'title' => 'Hotel #2'], - ] - ); - } - /** * @see DataSet/changeParentContentRecordSorting.csv */ diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php index 87bf9584630c..5b60ba9d8f7a 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php @@ -103,6 +103,41 @@ class ActionTest extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\Fore ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1')); } + /** + * @test + * @see DataSet/copyParentContentToLanguageWAllChildren.csv + */ + public function copyParentContentToLanguageWithAllChildren() + { + parent::copyParentContentToLanguageWithAllChildren(); + $this->assertAssertionDataSet('copyParentContentToLanguageWAllChildren'); + + $this->setUpFrontendRootPage(1, [ + 'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.ts', + 'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/ExtbaseJsonRenderer.ts', + 'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRendererNoOverlay.ts' + ]); + $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections('Default', 'Extbase:list()'); + $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint() + ->setRecordIdentifier(self::TABLE_Content . ':' . $this->recordIds['localizedContentId'])->setRecordField(self::FIELD_ContentHotel) + ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1')); + } + + /** + * @test + * @see DataSet/localizeParentContentWAllChildren.csv + */ + public function localizeParentContentWithAllChildren() + { + parent::localizeParentContentWithAllChildren(); + $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + + $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections('Default', 'Extbase:list()'); + $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint() + ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel) + ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1')); + } + /** * @test * @see DataSet/localizeParentContentSynchronization.csv @@ -148,22 +183,6 @@ class ActionTest extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\Fore ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1', '[Translate to Dansk:] New Hotel #1')); } - /** - * @test - * @see DataSet/localizeChildrenHStandaloneChildrenLanguageSynchronization.csv - * @see https://forge.typo3.org/issues/81915 - */ - public function localizeChildrenHavingStandaloneChildrenLanguageSynchronization() - { - parent::localizeChildrenHavingStandaloneChildrenInSelectModeAndLanguageSynchronization(); - $this->assertAssertionDataSet('locChildrenHStandaloneChildrenLanguageSynch'); - - $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections('Default', 'Extbase:list()'); - $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint() - ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel) - ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1', '[Translate to Dansk:] Hotel #2')); - } - /** * @test * @see DataSet/changeParentContentRecordSorting.csv diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToLanguageWAllChildren.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToLanguageWAllChildren.csv new file mode 100644 index 000000000000..f1717cb5661e --- /dev/null +++ b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/copyParentContentToLanguageWAllChildren.csv @@ -0,0 +1,29 @@ +tt_content +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1nff_hotels +,297,89,256,0,0,0,0,0,0,0,0,0,"Regular Element #1",2 +,298,89,512,0,0,0,0,0,0,0,0,0,"Regular Element #2",1 +,299,89,768,0,1,0,298,0,0,0,0,0,"[Translate to Dansk:] Regular Element #2",1 +tx_irretutorial_1nff_hotel +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers +,2,89,512,0,0,0,0,0,0,0,0,0,"Hotel #0",89,pages,,0 +,3,89,768,0,0,0,0,0,0,0,0,0,"Hotel #1",297,tt_content,,2 +,4,89,1536,0,0,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1 +,5,89,1024,0,0,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1 +,6,89,1,0,1,0,5,0,0,0,0,0,"[Translate to Dansk:] Hotel #1",299,tt_content,,1 +tx_irretutorial_1nff_offer +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices +,5,89,512,0,0,0,0,0,0,0,0,0,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3 +,6,89,1536,0,0,0,0,0,0,0,0,0,"Offer #1.2",3,tx_irretutorial_1nff_hotel,,2 +,7,89,768,0,0,0,0,0,0,0,0,0,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1 +,8,89,1024,0,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1 +,9,89,1,0,1,0,8,0,0,0,0,0,"[Translate to Dansk:] Offer #1.1",6,tx_irretutorial_1nff_hotel,,1 +tx_irretutorial_1nff_price +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier +,7,89,512,0,0,0,0,0,0,0,0,0,"Price #1.1.1",5,tx_irretutorial_1nff_offer, +,8,89,1792,0,0,0,0,0,0,0,0,0,"Price #1.1.2",5,tx_irretutorial_1nff_offer, +,9,89,2304,0,0,0,0,0,0,0,0,0,"Price #1.1.3",5,tx_irretutorial_1nff_offer, +,10,89,768,0,0,0,0,0,0,0,0,0,"Price #1.2.1",6,tx_irretutorial_1nff_offer, +,11,89,2048,0,0,0,0,0,0,0,0,0,"Price #1.2.2",6,tx_irretutorial_1nff_offer, +,12,89,1024,0,0,0,0,0,0,0,0,0,"Price #2.1.1",7,tx_irretutorial_1nff_offer, +,13,89,1280,0,0,0,0,0,0,0,0,0,"Price #1.1.1",8,tx_irretutorial_1nff_offer, +,14,89,1,0,1,0,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1",9,tx_irretutorial_1nff_offer, diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/locChildrenHStandaloneChildrenLanguageSynch.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/locChildrenHStandaloneChildrenLanguageSynch.csv deleted file mode 100644 index a6e833725a41..000000000000 --- a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/locChildrenHStandaloneChildrenLanguageSynch.csv +++ /dev/null @@ -1,31 +0,0 @@ -tt_content -,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1nff_hotels,l10n_state -,297,89,256,0,0,0,0,0,0,0,0,0,"Regular Element #1",2, -,298,89,512,0,0,0,0,0,0,0,0,0,"Regular Element #2",2, -,299,89,768,0,1,298,298,0,0,0,0,0,"[Translate to Dansk:] Regular Element #2",2,"{""tx_irretutorial_1nff_hotels"":""parent""}" -tx_irretutorial_1nff_hotel -,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers -,2,89,1280,0,0,0,0,0,0,0,0,0,"Hotel #0",89,pages,,0 -,3,89,1536,0,0,0,0,0,0,0,0,0,"Hotel #1",297,tt_content,,2 -,4,89,2048,0,0,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1 -,5,89,1,0,0,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1 -,6,89,1024,0,0,0,0,0,0,0,0,0,"Hotel Standalone",0,tt_content,,0 -,7,89,1,0,1,5,5,0,0,0,0,0,"[Translate to Dansk:] Hotel #1",299,tt_content,,0 -,8,89,2,0,0,0,0,0,0,0,0,0,"Hotel #2",298,tt_content,,0 -,9,89,2,0,1,8,0,0,0,0,0,0,"[Translate to Dansk:] Hotel #2",299,tt_content,,0 -tx_irretutorial_1nff_offer -,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices -,5,89,1,0,0,0,0,0,0,0,0,0,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3 -,6,89,2,0,0,0,0,0,0,0,0,0,"Offer #1.2",3,tx_irretutorial_1nff_hotel,,2 -,7,89,1,0,0,0,0,0,0,0,0,0,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1 -,8,89,1,0,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1 -,9,89,0,0,0,0,0,0,0,0,0,0,"Offer Standalone",0,tt_content,,0 -tx_irretutorial_1nff_price -,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier -,7,89,1,0,0,0,0,0,0,0,0,0,"Price #1.1.1",5,tx_irretutorial_1nff_offer, -,8,89,2,0,0,0,0,0,0,0,0,0,"Price #1.1.2",5,tx_irretutorial_1nff_offer, -,9,89,3,0,0,0,0,0,0,0,0,0,"Price #1.1.3",5,tx_irretutorial_1nff_offer, -,10,89,1,0,0,0,0,0,0,0,0,0,"Price #1.2.1",6,tx_irretutorial_1nff_offer, -,11,89,2,0,0,0,0,0,0,0,0,0,"Price #1.2.2",6,tx_irretutorial_1nff_offer, -,12,89,1,0,0,0,0,0,0,0,0,0,"Price #2.1.1",7,tx_irretutorial_1nff_offer, -,13,89,1,0,0,0,0,0,0,0,0,0,"Price #1.1.1",8,tx_irretutorial_1nff_offer, diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildren.csv b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildren.csv new file mode 100644 index 000000000000..96862818dbfd --- /dev/null +++ b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildren.csv @@ -0,0 +1,29 @@ +tt_content +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1nff_hotels +,297,89,256,0,0,0,0,0,0,0,0,0,"Regular Element #1",2 +,298,89,512,0,0,0,0,0,0,0,0,0,"Regular Element #2",1 +,299,89,768,0,1,298,298,0,0,0,0,0,"[Translate to Dansk:] Regular Element #2",1 +tx_irretutorial_1nff_hotel +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers +,2,89,512,0,0,0,0,0,0,0,0,0,"Hotel #0",89,pages,,0 +,3,89,768,0,0,0,0,0,0,0,0,0,"Hotel #1",297,tt_content,,2 +,4,89,1536,0,0,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1 +,5,89,1024,0,0,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1 +,6,89,1,0,1,5,5,0,0,0,0,0,"[Translate to Dansk:] Hotel #1",299,tt_content,,1 +tx_irretutorial_1nff_offer +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices +,5,89,512,0,0,0,0,0,0,0,0,0,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3 +,6,89,1536,0,0,0,0,0,0,0,0,0,"Offer #1.2",3,tx_irretutorial_1nff_hotel,,2 +,7,89,768,0,0,0,0,0,0,0,0,0,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1 +,8,89,1024,0,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1 +,9,89,1,0,1,8,8,0,0,0,0,0,"[Translate to Dansk:] Offer #1.1",6,tx_irretutorial_1nff_hotel,,1 +tx_irretutorial_1nff_price +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3_origuid,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier +,7,89,512,0,0,0,0,0,0,0,0,0,"Price #1.1.1",5,tx_irretutorial_1nff_offer, +,8,89,1792,0,0,0,0,0,0,0,0,0,"Price #1.1.2",5,tx_irretutorial_1nff_offer, +,9,89,2304,0,0,0,0,0,0,0,0,0,"Price #1.1.3",5,tx_irretutorial_1nff_offer, +,10,89,768,0,0,0,0,0,0,0,0,0,"Price #1.2.1",6,tx_irretutorial_1nff_offer, +,11,89,2048,0,0,0,0,0,0,0,0,0,"Price #1.2.2",6,tx_irretutorial_1nff_offer, +,12,89,1024,0,0,0,0,0,0,0,0,0,"Price #2.1.1",7,tx_irretutorial_1nff_offer, +,13,89,1280,0,0,0,0,0,0,0,0,0,"Price #1.1.1",8,tx_irretutorial_1nff_offer, +,14,89,1,0,1,13,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1",9,tx_irretutorial_1nff_offer, diff --git a/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/FlexForms/tt_content_flexform.xml b/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/FlexForms/tt_content_flexform.xml index 17d5cf9e223f..eec1e8e395ca 100644 --- a/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/FlexForms/tt_content_flexform.xml +++ b/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/FlexForms/tt_content_flexform.xml @@ -48,9 +48,6 @@ <showPossibleLocalizationRecords>1</showPossibleLocalizationRecords> <showRemovedLocalizationRecords>1</showRemovedLocalizationRecords> </appearance> - <behaviour type="array"> - <localizeChildrenAtParentLocalization>1</localizeChildrenAtParentLocalization> - </behaviour> </config> </TCEforms> </files> diff --git a/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/Overrides/tt_content.php b/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/Overrides/tt_content.php index 1a980bd31c1f..3e2f2c7680d6 100644 --- a/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/Overrides/tt_content.php +++ b/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/Overrides/tt_content.php @@ -24,9 +24,6 @@ $GLOBALS['TCA']['tt_content']['ctrl']['shadowColumnsForMovePlaceholders'] = 'tx_ 'showPossibleLocalizationRecords' => 1, 'showRemovedLocalizationRecords' => 1, ], - 'behaviour' => [ - 'localizeChildrenAtParentLocalization' => true, - ], ] ], 'tx_irretutorial_1ncsv_hotels' => [ @@ -42,9 +39,6 @@ $GLOBALS['TCA']['tt_content']['ctrl']['shadowColumnsForMovePlaceholders'] = 'tx_ 'showPossibleLocalizationRecords' => 1, 'showRemovedLocalizationRecords' => 1, ], - 'behaviour' => [ - 'localizeChildrenAtParentLocalization' => true, - ], 'default' => '', ] ], diff --git a/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1ncsv_hotel.php b/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1ncsv_hotel.php index 39b7267d6626..67e78a11fd39 100644 --- a/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1ncsv_hotel.php +++ b/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1ncsv_hotel.php @@ -91,9 +91,6 @@ return [ 'showPossibleLocalizationRecords' => 1, 'showRemovedLocalizationRecords' => 1, ], - 'behaviour' => [ - 'localizeChildrenAtParentLocalization' => true, - ], 'default' => '' ] ], diff --git a/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1ncsv_offer.php b/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1ncsv_offer.php index c07a846ca67e..0f24c417a728 100644 --- a/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1ncsv_offer.php +++ b/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1ncsv_offer.php @@ -91,9 +91,6 @@ return [ 'showPossibleLocalizationRecords' => 1, 'showRemovedLocalizationRecords' => 1, ], - 'behaviour' => [ - 'localizeChildrenAtParentLocalization' => true, - ], 'default' => '' ] ], diff --git a/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1nff_hotel.php b/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1nff_hotel.php index 6b858c1f295c..15523ad10b32 100644 --- a/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1nff_hotel.php +++ b/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1nff_hotel.php @@ -112,9 +112,6 @@ return [ 'showPossibleLocalizationRecords' => 1, 'showRemovedLocalizationRecords' => 1, ], - 'behaviour' => [ - 'localizeChildrenAtParentLocalization' => true, - ], ] ], ], diff --git a/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1nff_offer.php b/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1nff_offer.php index de9f71914565..4ff3ec32a028 100644 --- a/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1nff_offer.php +++ b/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1nff_offer.php @@ -112,9 +112,6 @@ return [ 'showPossibleLocalizationRecords' => 1, 'showRemovedLocalizationRecords' => 1, ], - 'behaviour' => [ - 'localizeChildrenAtParentLocalization' => true, - ], ] ], ], diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php index 9dff5b9c9913..1b82e46ecf18 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php @@ -117,6 +117,21 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1')); } + /** + * @test + * @see DataSet/localizeParentContentWAllChildren.csv + */ + public function localizeParentContentWithAllChildren() + { + parent::localizeParentContentWithAllChildren(); + $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + + $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections(); + $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint() + ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel) + ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1')); + } + /** * @test * @see DataSet/changeParentContentRecordSorting.csv diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildren.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildren.csv new file mode 100644 index 000000000000..3092b1639bf9 --- /dev/null +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/localizeParentContentWAllChildren.csv @@ -0,0 +1,32 @@ +tt_content +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1ncsv_hotels +,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1","3,4" +,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5 +,299,89,768,0,1,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2",6 +,300,-1,768,0,1,298,1,-1,0,299,0,"[Translate to Dansk:] Regular Element #2",6 +tx_irretutorial_1ncsv_hotel +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers +,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6" +,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7 +,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8 +,6,89,96,0,1,5,1,1,0,0,0,"[Translate to Dansk:] Hotel #1",9 +,7,-1,96,0,1,5,1,-1,0,6,0,"[Translate to Dansk:] Hotel #1",9 +tx_irretutorial_1ncsv_offer +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices +,5,89,256,0,0,0,0,0,0,0,0,"Offer #1.1","7,8,9" +,6,89,128,0,0,0,0,0,0,0,0,"Offer #1.2","10,11" +,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12 +,8,89,32,0,0,0,0,0,0,0,0,"Offer #1.1",13 +,9,89,48,0,1,8,1,1,0,0,0,"[Translate to Dansk:] Offer #1.1",14 +,10,-1,48,0,1,8,1,-1,0,9,0,"[Translate to Dansk:] Offer #1.1",14 +tx_irretutorial_1ncsv_price +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title +,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1" +,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2" +,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3" +,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1" +,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2" +,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1" +,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1" +,14,89,6,0,1,13,1,1,0,0,0,"[Translate to Dansk:] Price #1.1.1" +,15,-1,6,0,1,13,1,-1,0,14,0,"[Translate to Dansk:] Price #1.1.1" diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/ActionTest.php index bfec0122bc82..6112b028fd12 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/ActionTest.php @@ -128,6 +128,22 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1')); } + /** + * @test + * @see DataSet/localizeParentContentWAllChildren.csv + */ + public function localizeParentContentWithAllChildren() + { + parent::localizeParentContentWithAllChildren(); + $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); + $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + + $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections(); + $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint() + ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel) + ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1')); + } + /** * @test * @see DataSet/changeParentContentRecordSorting.csv diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContentWAllChildren.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContentWAllChildren.csv new file mode 100644 index 000000000000..888a11b76c3d --- /dev/null +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/localizeParentContentWAllChildren.csv @@ -0,0 +1,28 @@ +tt_content +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1ncsv_hotels +,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1","3,4" +,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5 +,299,89,768,0,1,298,0,0,0,0,0,"[Translate to Dansk:] Regular Element #2",6 +tx_irretutorial_1ncsv_hotel +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers +,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6" +,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7 +,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8 +,6,89,96,0,1,5,0,0,0,0,0,"[Translate to Dansk:] Hotel #1",9 +tx_irretutorial_1ncsv_offer +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices +,5,89,256,0,0,0,0,0,0,0,0,"Offer #1.1","7,8,9" +,6,89,128,0,0,0,0,0,0,0,0,"Offer #1.2","10,11" +,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12 +,8,89,32,0,0,0,0,0,0,0,0,"Offer #1.1",13 +,9,89,48,0,1,8,0,0,0,0,0,"[Translate to Dansk:] Offer #1.1",14 +tx_irretutorial_1ncsv_price +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title +,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1" +,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2" +,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3" +,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1" +,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2" +,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1" +,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1" +,14,89,6,0,1,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1" diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/ActionTest.php index d489da468e91..f560b9428b1b 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/ActionTest.php @@ -127,6 +127,22 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1')); } + /** + * @test + * @see DataSet/localizeParentContentWAllChildren.csv + */ + public function localizeParentContentWithAllChildren() + { + parent::localizeParentContentWithAllChildren(); + $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); + $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + + $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections(); + $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint() + ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel) + ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1')); + } + /** * @test * @see DataSet/changeParentContentRecordSorting.csv diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContentWAllChildren.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContentWAllChildren.csv new file mode 100644 index 000000000000..888a11b76c3d --- /dev/null +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/localizeParentContentWAllChildren.csv @@ -0,0 +1,28 @@ +tt_content +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1ncsv_hotels +,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1","3,4" +,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",5 +,299,89,768,0,1,298,0,0,0,0,0,"[Translate to Dansk:] Regular Element #2",6 +tx_irretutorial_1ncsv_hotel +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,offers +,3,89,256,0,0,0,0,0,0,0,0,"Hotel #1","5,6" +,4,89,128,0,0,0,0,0,0,0,0,"Hotel #2",7 +,5,89,64,0,0,0,0,0,0,0,0,"Hotel #1",8 +,6,89,96,0,1,5,0,0,0,0,0,"[Translate to Dansk:] Hotel #1",9 +tx_irretutorial_1ncsv_offer +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,prices +,5,89,256,0,0,0,0,0,0,0,0,"Offer #1.1","7,8,9" +,6,89,128,0,0,0,0,0,0,0,0,"Offer #1.2","10,11" +,7,89,64,0,0,0,0,0,0,0,0,"Offer #2.1",12 +,8,89,32,0,0,0,0,0,0,0,0,"Offer #1.1",13 +,9,89,48,0,1,8,0,0,0,0,0,"[Translate to Dansk:] Offer #1.1",14 +tx_irretutorial_1ncsv_price +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title +,7,89,256,0,0,0,0,0,0,0,0,"Price #1.1.1" +,8,89,128,0,0,0,0,0,0,0,0,"Price #1.1.2" +,9,89,64,0,0,0,0,0,0,0,0,"Price #1.1.3" +,10,89,32,0,0,0,0,0,0,0,0,"Price #1.2.1" +,11,89,16,0,0,0,0,0,0,0,0,"Price #1.2.2" +,12,89,8,0,0,0,0,0,0,0,0,"Price #2.1.1" +,13,89,4,0,0,0,0,0,0,0,0,"Price #1.1.1" +,14,89,6,0,1,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1" diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php index 1fcf66166274..f55f15c52b94 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php @@ -117,6 +117,21 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1')); } + /** + * @test + * @see DataSet/localizeParentContentWAllChildren.csv + */ + public function localizeParentContentWithAllChildren() + { + parent::localizeParentContentWithAllChildren(); + $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + + $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId, self::VALUE_BackendUserId, self::VALUE_WorkspaceId)->getResponseSections('Default', 'Extbase:list()'); + $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint() + ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel) + ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1')); + } + /** * @test * @see DataSet/changeParentContentRecordSorting.csv diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildren.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildren.csv new file mode 100644 index 000000000000..71294f07fd09 --- /dev/null +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/localizeParentContentWAllChildren.csv @@ -0,0 +1,33 @@ +tt_content +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1nff_hotels +,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",2 +,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1 +,299,89,768,0,1,298,1,1,0,0,0,"[Translate to Dansk:] Regular Element #2",0 +,300,-1,768,0,1,298,1,-1,0,299,0,"[Translate to Dansk:] Regular Element #2",1 +tx_irretutorial_1nff_hotel +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers +,2,89,512,0,0,0,0,0,0,0,0,"Hotel #0",89,pages,,0 +,3,89,768,0,0,0,0,0,0,0,0,"Hotel #1",297,tt_content,,2 +,4,89,1536,0,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1 +,5,89,1024,0,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1 +,6,89,1,0,1,5,1,1,0,0,0,"[Translate to Dansk:] Hotel #1",299,tt_content,,0 +,7,-1,1280,0,1,5,1,-1,0,6,0,"[Translate to Dansk:] Hotel #1",299,tt_content,,1 +tx_irretutorial_1nff_offer +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices +,5,89,512,0,0,0,0,0,0,0,0,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3 +,6,89,1536,0,0,0,0,0,0,0,0,"Offer #1.2",3,tx_irretutorial_1nff_hotel,,2 +,7,89,768,0,0,0,0,0,0,0,0,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1 +,8,89,1024,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1 +,9,89,1,0,1,8,1,1,0,0,0,"[Translate to Dansk:] Offer #1.1",6,tx_irretutorial_1nff_hotel,,0 +,10,-1,1280,0,1,8,1,-1,0,9,0,"[Translate to Dansk:] Offer #1.1",6,tx_irretutorial_1nff_hotel,,1 +tx_irretutorial_1nff_price +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier +,7,89,512,0,0,0,0,0,0,0,0,"Price #1.1.1",5,tx_irretutorial_1nff_offer, +,8,89,1792,0,0,0,0,0,0,0,0,"Price #1.1.2",5,tx_irretutorial_1nff_offer, +,9,89,2304,0,0,0,0,0,0,0,0,"Price #1.1.3",5,tx_irretutorial_1nff_offer, +,10,89,768,0,0,0,0,0,0,0,0,"Price #1.2.1",6,tx_irretutorial_1nff_offer, +,11,89,2048,0,0,0,0,0,0,0,0,"Price #1.2.2",6,tx_irretutorial_1nff_offer, +,12,89,1024,0,0,0,0,0,0,0,0,"Price #2.1.1",7,tx_irretutorial_1nff_offer, +,13,89,1280,0,0,0,0,0,0,0,0,"Price #1.1.1",8,tx_irretutorial_1nff_offer, +,14,89,1,0,1,13,1,1,0,0,0,"[Translate to Dansk:] Price #1.1.1",9,tx_irretutorial_1nff_offer, +,15,-1,1536,0,1,13,1,-1,0,14,0,"[Translate to Dansk:] Price #1.1.1",9,tx_irretutorial_1nff_offer, diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/ActionTest.php index 51635dcb3a2c..080f12dd14b9 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/ActionTest.php @@ -124,6 +124,22 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1')); } + /** + * @test + * @see DataSet/localizeParentContentWAllChildren.csv + */ + public function localizeParentContentWithAllChildren() + { + parent::localizeParentContentWithAllChildren(); + $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); + $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + + $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections('Default', 'Extbase:list()'); + $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint() + ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel) + ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1')); + } + /** * @test * @see DataSet/changeParentContentRecordSorting.csv diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentWAllChildren.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentWAllChildren.csv new file mode 100644 index 000000000000..6e914a947a68 --- /dev/null +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/localizeParentContentWAllChildren.csv @@ -0,0 +1,29 @@ +tt_content +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1nff_hotels +,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",2 +,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1 +,299,89,768,0,1,298,0,0,0,0,0,"[Translate to Dansk:] Regular Element #2",1 +tx_irretutorial_1nff_hotel +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers +,2,89,512,0,0,0,0,0,0,0,0,"Hotel #0",89,pages,,0 +,3,89,768,0,0,0,0,0,0,0,0,"Hotel #1",297,tt_content,,2 +,4,89,1536,0,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1 +,5,89,1024,0,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1 +,6,89,1,0,1,5,0,0,0,0,0,"[Translate to Dansk:] Hotel #1",299,tt_content,,1 +tx_irretutorial_1nff_offer +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices +,5,89,512,0,0,0,0,0,0,0,0,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3 +,6,89,1536,0,0,0,0,0,0,0,0,"Offer #1.2",3,tx_irretutorial_1nff_hotel,,2 +,7,89,768,0,0,0,0,0,0,0,0,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1 +,8,89,1024,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1 +,9,89,1,0,1,8,0,0,0,0,0,"[Translate to Dansk:] Offer #1.1",6,tx_irretutorial_1nff_hotel,,1 +tx_irretutorial_1nff_price +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier +,7,89,512,0,0,0,0,0,0,0,0,"Price #1.1.1",5,tx_irretutorial_1nff_offer, +,8,89,1792,0,0,0,0,0,0,0,0,"Price #1.1.2",5,tx_irretutorial_1nff_offer, +,9,89,2304,0,0,0,0,0,0,0,0,"Price #1.1.3",5,tx_irretutorial_1nff_offer, +,10,89,768,0,0,0,0,0,0,0,0,"Price #1.2.1",6,tx_irretutorial_1nff_offer, +,11,89,2048,0,0,0,0,0,0,0,0,"Price #1.2.2",6,tx_irretutorial_1nff_offer, +,12,89,1024,0,0,0,0,0,0,0,0,"Price #2.1.1",7,tx_irretutorial_1nff_offer, +,13,89,1280,0,0,0,0,0,0,0,0,"Price #1.1.1",8,tx_irretutorial_1nff_offer, +,14,89,1,0,1,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1",9,tx_irretutorial_1nff_offer, diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/ActionTest.php index 4338b5623c12..56c16472daeb 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/ActionTest.php @@ -123,6 +123,22 @@ class ActionTest extends \TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRR ->setTable(self::TABLE_Hotel)->setField('title')->setValues('Hotel #1')); } + /** + * @test + * @see DataSet/localizeParentContentWAllChildren.csv + */ + public function localizeParentContentWithAllChildren() + { + parent::localizeParentContentWithAllChildren(); + $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); + $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + + $responseSections = $this->getFrontendResponse(self::VALUE_PageId, self::VALUE_LanguageId)->getResponseSections('Default', 'Extbase:list()'); + $this->assertThat($responseSections, $this->getRequestSectionStructureHasRecordConstraint() + ->setRecordIdentifier(self::TABLE_Content . ':' . self::VALUE_ContentIdLast)->setRecordField(self::FIELD_ContentHotel) + ->setTable(self::TABLE_Hotel)->setField('title')->setValues('[Translate to Dansk:] Hotel #1')); + } + /** * @test * @see DataSet/changeParentContentRecordSorting.csv diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentWAllChildren.csv b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentWAllChildren.csv new file mode 100644 index 000000000000..6e914a947a68 --- /dev/null +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/localizeParentContentWAllChildren.csv @@ -0,0 +1,29 @@ +tt_content +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,header,tx_irretutorial_1nff_hotels +,297,89,256,0,0,0,0,0,0,0,0,"Regular Element #1",2 +,298,89,512,0,0,0,0,0,0,0,0,"Regular Element #2",1 +,299,89,768,0,1,298,0,0,0,0,0,"[Translate to Dansk:] Regular Element #2",1 +tx_irretutorial_1nff_hotel +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,offers +,2,89,512,0,0,0,0,0,0,0,0,"Hotel #0",89,pages,,0 +,3,89,768,0,0,0,0,0,0,0,0,"Hotel #1",297,tt_content,,2 +,4,89,1536,0,0,0,0,0,0,0,0,"Hotel #2",297,tt_content,,1 +,5,89,1024,0,0,0,0,0,0,0,0,"Hotel #1",298,tt_content,,1 +,6,89,1,0,1,5,0,0,0,0,0,"[Translate to Dansk:] Hotel #1",299,tt_content,,1 +tx_irretutorial_1nff_offer +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier,prices +,5,89,512,0,0,0,0,0,0,0,0,"Offer #1.1",3,tx_irretutorial_1nff_hotel,,3 +,6,89,1536,0,0,0,0,0,0,0,0,"Offer #1.2",3,tx_irretutorial_1nff_hotel,,2 +,7,89,768,0,0,0,0,0,0,0,0,"Offer #2.1",4,tx_irretutorial_1nff_hotel,,1 +,8,89,1024,0,0,0,0,0,0,0,0,"Offer #1.1",5,tx_irretutorial_1nff_hotel,,1 +,9,89,1,0,1,8,0,0,0,0,0,"[Translate to Dansk:] Offer #1.1",6,tx_irretutorial_1nff_hotel,,1 +tx_irretutorial_1nff_price +,uid,pid,sorting,deleted,sys_language_uid,l18n_parent,t3ver_wsid,t3ver_state,t3ver_stage,t3ver_oid,t3ver_move_id,title,parentid,parenttable,parentidentifier +,7,89,512,0,0,0,0,0,0,0,0,"Price #1.1.1",5,tx_irretutorial_1nff_offer, +,8,89,1792,0,0,0,0,0,0,0,0,"Price #1.1.2",5,tx_irretutorial_1nff_offer, +,9,89,2304,0,0,0,0,0,0,0,0,"Price #1.1.3",5,tx_irretutorial_1nff_offer, +,10,89,768,0,0,0,0,0,0,0,0,"Price #1.2.1",6,tx_irretutorial_1nff_offer, +,11,89,2048,0,0,0,0,0,0,0,0,"Price #1.2.2",6,tx_irretutorial_1nff_offer, +,12,89,1024,0,0,0,0,0,0,0,0,"Price #2.1.1",7,tx_irretutorial_1nff_offer, +,13,89,1280,0,0,0,0,0,0,0,0,"Price #1.1.1",8,tx_irretutorial_1nff_offer, +,14,89,1,0,1,13,0,0,0,0,0,"[Translate to Dansk:] Price #1.1.1",9,tx_irretutorial_1nff_offer, -- GitLab