68925[BUGFIX] Handle workspace overlays in AbstractItemProvider
Commit message
Review
-
Code review CR +2 Done
- Oli Bartsch +2
- Christian Kuhn +1
- Benni Mack +1
-
Verified V +2 Done
- Oli Bartsch +2
- Christian Kuhn +1
- Benni Mack +1
- core-ci +1 CI
Issues 1
Files 1
Review log 1620
-
Oli Bartsch uploaded patch set 1 04/29/21, 22:29
-
core-ci voted on patch set 1 V +1 04/29/21, 22:42 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10946
-
Christian Kuhn commented on patch set 1 04/29/21, 22:56
Good one! That's a significant bug to fix here. Will give it a detail review and testing shot tomorrow.AbstractItemProvider.php:350draft review: not 100% sure about 4th param.AbstractItemProvider.php:604Unresolvedthat's ok for sure. -
Oli Bartsch commented on patch set 1 04/30/21, 01:10
Reply
Yes, really important IMO. Thanks for testing.AbstractItemProvider.php:350Reply UnresolvedWithout the 4th parameter, the live record is not removed in case the offline record is a move placeholder. Thats indeed what the bug report is about. Let's say we have three records: * UID 1: Live record * UID 2: Live record * UID 3: Offline record - Move placeholder with t3ver_oid=1 In workspaceOL(), getWorkspaceVersionOfRecord() gets called for each of them. Following happens: * UID 1 is overlayed and gets t3ver_state=4 assigned. * UID 2 can not be overlayed as no offline record exists * UID 3 can not be overlayed as it is already an offline record The result is: * UID 1: [t3ver_state=4, t3ver_wsid=1, ..] * UID 2: FALSE * UID 3: FALSE So no further changes to UID 2 and UID 3, since the function ends in case the result of the overlay is FALSE. UID 1 passes the check, since the getWorkspaceVersionOfRecord successfully returned an overlay record. In the following the VersionState is determined and checked against $versionState->equals(VersionState::MOVE_POINTER). If true, like in our case, the row (passed by reference) is set to FALSE, but only in case the 4th parameter is set to TRUE. If so, only UID 2 and UID 3 do still contain the row (since it was not adjusted due to the failed overlay attempt) and are therefore further used in the outside code. -
Oli Bartsch commented on patch set 1 CR -1 04/30/21, 13:07
This fixes the duplicated display but now leads to INVALID VALUE in case the moved record is the currently selected one. -
Oli Bartsch uploaded patch set 2 05/01/21, 11:53
-
core-ci voted on patch set 2 V +1 05/01/21, 12:04 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11005
-
Benni Mack commented on patch set 2 V +1 CR +1 05/01/21, 14:53
Nice one. Patch applies clean in my v10.4 installation with the select + tree without overlays now -
Christian Kuhn voted on patch set 2 V +1 CR +1 05/01/21, 17:19
-
Oli Bartsch commented on patch set 2 CR -1 05/01/21, 18:29
Thanks for reviewing so far. Need to check one thing in more detail. -
Oli Bartsch uploaded patch set 3 05/01/21, 19:41
-
Oli Bartsch commented on patch set 3 05/01/21, 19:42
Still issues with move placeholder. Therefore WIP for the moment. -
core-ci voted on patch set 3 V +1 05/01/21, 19:52 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11025
-
Oli Bartsch updated the commit message in patch set 4 05/01/21, 20:07
-
Oli Bartsch commented on patch set 4 05/01/21, 20:10
Reply
This patch now fixes several issues including the reported bug. However, there is still a problem with the combination of TCA PID restriction and move placeholders. Since this is not only bound to these specific TCA types, we will fix this in a more generic way in a separate patch. -
core-ci voted on patch set 4 V +1 05/01/21, 20:18 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11026
-
Christian Kuhn voted on patch set 4 V +1 CR +1 05/01/21, 21:41
-
Benni Mack voted on patch set 4 V +1 CR +1 05/01/21, 23:03
-
Oli Bartsch voted on patch set 4 V +2 CR +2 05/03/21, 08:15
-
Oli Bartsch merged patch set 5 05/03/21, 08:15