71097[BUGFIX] Avoid dangling MM relations on workspace publish
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Stefan Bürk +1
- Benni Mack +1
-
Verified V +2 Done
- Christian Kuhn +2
- Stefan Bürk +1
- Benni Mack +1
- core-ci +1 CI
Issues 2
Files 46
- typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php+2 −2
- typo3/sysext/core/Classes/Database/Schema/DefaultTcaSchema.php+2 −6
- typo3/sysext/core/Classes/Database/RelationHandler.php+9 −3
- typo3/sysext/core/Classes/DataHandling/DataHandler.php2+121 −102
- typo3/sysext/core/Documentation/Changelog/master/Deprecation-95275-RelationHandler-remapMM.rstnew+36 −0
- typo3/sysext/core/Tests/Functional/DataHandling/SelectFlex/DataSet/ImportDefault.csvnew+30 −0
- typo3/sysext/core/Tests/Functional/DataHandling/SelectFlex/Modify/DataSet/addElementRelation.csvnew+32 −0
- typo3/sysext/core/Tests/Functional/DataHandling/SelectFlex/Modify/ActionTest.phpnew+46 −0
- typo3/sysext/core/Tests/Functional/DataHandling/SelectFlex/AbstractActionTestCase.phpnew+74 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_select_flex_mm/Configuration/TCA/tx_testselectflexmm_foreign.phpnew+84 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_select_flex_mm/Configuration/TCA/tx_testselectflexmm_local.phpnew+115 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_select_flex_mm/Resources/Public/Icons/Extension.gifnewbinary
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_select_flex_mm/ext_emconf.phpnew+23 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_select_flex_mm/ext_tables.phpnew+10 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_select_flex_mm/ext_tables.sqlnew+19 −0
- typo3/sysext/core/Tests/Unit/Database/Schema/DefaultTcaSchemaTest.php+6 −0
- typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php+7 −0
- typo3/sysext/workspaces/Classes/Hook/DataHandlerHook.php+1 −2
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/addCategoryRelation.csv+2 −4
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/changeCategoryRelationSorting.csv+2 −4
Show 26 more files
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/deleteCategoryOfRelation.csv+1 −2
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/deleteCategoryRelation.csv+1 −3
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/deleteContentOfRelation.csv+0 −2
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/modifyBothsOfRelation.csv+2 −4
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/modifyCategoryOfRelation.csv+1 −2
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/modifyContentOfRelation.csv+2 −4
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/moveContentOfRelationToDifferentPage.csv+0 −2
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/addCategoryRelation.csv+0 −2
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/changeCategoryRelationSorting.csv+0 −2
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/deleteCategoryOfRelation.csv+0 −1
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/deleteCategoryRelation.csv+0 −2
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/deleteContentOfRelation.csv+0 −2
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/modifyBothsOfRelation.csv+0 −2
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/modifyCategoryOfRelation.csv+0 −1
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/modifyContentOfRelation.csv+0 −2
- typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/moveContentOfRelationToDifferentPage.csv+0 −2
- typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/DataSet/ImportDefault.csvnew+39 −0
- typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Discard/DataSet/addElementRelation.csvnew+35 −0
- typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Discard/ActionTest.phpnew+47 −0
- typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Modify/DataSet/addElementRelation.csvnew+37 −0
- typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Modify/ActionTest.php2new+46 −0
- typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Publish/DataSet/addElementRelation.csvnew+34 −0
- typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Publish/ActionTest.phpnew+47 −0
- typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/PublishAll/DataSet/addElementRelation.csvnew+34 −0
- typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/PublishAll/ActionTest.phpnew+47 −0
- typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/AbstractActionTestCase.phpnew+39 −0
Review log 2338
Show 713 earlier messages
-
Christian Kuhn uploaded patch set 1 09/15/21, 20:20
-
core-ci voted on patch set 1 V -1 09/15/21, 20:41 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16766
-
Christian Kuhn commented on patch set 1 CR -1 09/15/21, 21:20
This reveals that DH workspace publish on MM leaves duplicate MM rows for existing relations, plus there is an issue with negative uid's. -
Christian Kuhn uploaded patch set 2 09/18/21, 16:23
-
core-ci voted on patch set 2 V -1 09/18/21, 16:42 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16909
-
Christian Kuhn uploaded patch set 3 09/18/21, 23:52
-
core-ci voted on patch set 3 V -1 09/19/21, 00:11 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16910
-
Christian Kuhn uploaded patch set 4 09/19/21, 01:11
-
core-ci voted on patch set 4 V -1 09/19/21, 01:33 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16912
-
Christian Kuhn uploaded patch set 5 09/19/21, 01:43
-
core-ci voted on patch set 5 V -1 09/19/21, 01:59 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16913
-
Christian Kuhn uploaded patch set 6 09/19/21, 11:01
-
core-ci voted on patch set 6 V -1 09/19/21, 11:19 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16916
-
Christian Kuhn uploaded patch set 7 09/19/21, 11:19
-
core-ci voted on patch set 7 V -1 09/19/21, 11:35 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16917
-
Christian Kuhn uploaded patch set 8 09/20/21, 06:35
-
core-ci voted on patch set 8 V -1 09/20/21, 06:50 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16924
-
Christian Kuhn uploaded patch set 9 09/20/21, 07:21
-
core-ci voted on patch set 9 V +1 09/20/21, 07:38 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16925
-
Christian Kuhn uploaded patch set 10 09/20/21, 11:44
-
core-ci voted on patch set 10 V +1 09/20/21, 12:01 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16933
-
Christian Kuhn uploaded patch set 11 09/20/21, 13:00
-
Christian Kuhn uploaded patch set 12 09/20/21, 13:08
-
core-ci voted on patch set 11 V +1 09/20/21, 13:15 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16936
-
core-ci voted on patch set 12 V +1 09/20/21, 13:33 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16938
-
Christian Kuhn commented on patch set 12 09/20/21, 14:43
stefan will review this. -
Stefan Bürk commented on patch set 12 V +1 09/20/21, 18:13
Thanks for the patch, Christian. Looked through all the parts, and as such working. Only have two small comments, where of the first one I'm not sure if it could maybe be a currenlty untested constellation or if it would be handled on other places. If I'm wrong there, I would vote +1, as the patch is workin as such. Regarding the reference test assertions, not a blocker - but maybe would make more sense ?DataHandler.php:5944Maybe add a `?? false` here as safety check, as not checked for existing MM key before - for flexform field? Normal TCA field has a prior check. (L5866) isReferenceField() do not check for MM key/array in field config; Would it make sense to add the MM key check of field config into that method ? Would make condition in L5866 also "smaller".ActionTest.php:35This test is on different tests with the same name, just commenting one: Would it not make more sense to do (and the other places) that assertCleanReferenceIndex is not disabled ?? ``` self::assertTrue($this->assertCleanReferenceIndex); ``` If it should be disabled this test is absolutly useless otherwise, or ? -
Christian Kuhn commented on patch set 12 09/20/21, 18:46
DataHandler.php:5944Reply> Maybe add a `?? false` here as safety check, as not checked for existing MM key before - for flexform field? Normal TCA field has a prior check. (L5866) empty() never throws notices or warnings on accessing non-existing arrays. > isReferenceField() do not check for MM key/array in field config; Would it make sense to add the MM key check of field config into that method ? isReferenceField() is used in different context, too, we shouldn't change that right now.ActionTest.php:35Replythat property will fall as soon as mm handling correctly handles refindex. -
Christian Kuhn uploaded patch set 13 09/20/21, 18:46
-
core-ci voted on patch set 13 V +1 09/20/21, 19:00 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16948
-
Christian Kuhn rebased onto patch set 14 09/20/21, 19:09
-
core-ci voted on patch set 14 V +1 09/20/21, 19:25 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16949
-
Christian Kuhn uploaded patch set 15 09/20/21, 20:11
-
core-ci voted on patch set 15 V +1 09/20/21, 20:25 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16953
-
Stefan Bürk voted on patch set 15 V +1 CR +1 09/20/21, 21:43
-
Benni Mack voted on patch set 15 V +1 CR +1 09/21/21, 09:16
-
Christian Kuhn voted on patch set 15 V +2 CR +2 09/21/21, 09:51
-
Christian Kuhn merged patch set 16 09/21/21, 09:51