[!!!][TASK] Remove move placeholders
Workspaces ("Element-based versioning") previously had - due to the "pid=-1" logic until TYPO3 v10 - a so-called "MOVE PLACEHOLDER". This was indicated by t3ver_state = 3, all relevant fields: * t3ver_state = 3 (move placeholder) * t3ver_oid = 0 no connected live record, it allowed fetching these records with one query together with live records as db restrictions t3ver_oid > 0 * t3ver_wsid = workspace UID * t3ver_move_id = UID of the live record * pid = new PID the version was moved to * sorting - when a record was moved within page with activated sorting Other record fields were not important. However, when moving a record, the value from TCA ctrl section "shadowColumnsForMovePlaceholders" was used to fill in gaps from the live record. The ACTUAL versioned record was indicated by t3ver_state = 4, the so-called "MOVE POINTER". In previous version until TYPO3 v10, it's PID field was set to -1, but since TYPO3 v10, it has the same PID as the "MOVE PLACEHOLDER". Characteristics of the move pointer as of TYPO3 v10: * t3ver_state = 4 (move pointer) * t3ver_oid = UID of the live record * t3ver_wsid = workspace UID * t3ver_move_id = 0 * pid = PID the version was moved to * sorting - same value as the live record (not evaluated until now) * All other fields with optionally modified content Both move placeholder and move pointer did not know each other directly. Fetching the move pointer for a move placeheldor (or the other way around) involved the live record, leading to many queries. The patch obsoletes the move placeholder records, moving necessary information to the move pointer: It now contains the updated sorting and is considered in the Database Restrictions to be fetched. In general, when publishing, the moved record now behaves identical to the other versioned types. This makes the internal code much easier, creates less DB queries on read + write and leads to less DB records in the database. The change removes creation of move placeholders, and considers the move pointers when evaluating sorting and PID in DataHandler. Read functionality from BackendUtility and PageRepository don't need an additional step to fetch the live version of a move placeholder anymore. An upgrade wizard takes existing move placeholders (state=3), updates pid+sorting (PID generally not needed, just to be sure) of the move pointer (state=4) and then deletes the move placeholder. TCA definition $TCA[my-table][ctrl][shadowColumnsForMovePlaceholders] is not needed anymore and removed by an auto TCA migration. Finally, workspace enabled tables do not need the t3ver_move_id field anymore: The live record UID is already in t3ver_oid field for state=4 records, just like with all other versioned records. The field will be fully removed with a separate patch in order to keep the actual CSV tests readable for this patch. Resolves: #92497 Releases: master Change-Id: I206336aec8be8a324fefdfd69f648f5a298c6ad1 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65797 Tested-by:TYPO3com <noreply@typo3.com> Tested-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- typo3/sysext/backend/Classes/Form/FormDataProvider/InlineOverrideChildTca.php 0 additions, 1 deletion.../Classes/Form/FormDataProvider/InlineOverrideChildTca.php
- typo3/sysext/backend/Classes/Tree/Repository/PageTreeRepository.php 20 additions, 32 deletions...xt/backend/Classes/Tree/Repository/PageTreeRepository.php
- typo3/sysext/backend/Classes/Tree/View/BrowseTreeView.php 0 additions, 1 deletiontypo3/sysext/backend/Classes/Tree/View/BrowseTreeView.php
- typo3/sysext/backend/Classes/Utility/BackendUtility.php 62 additions, 164 deletionstypo3/sysext/backend/Classes/Utility/BackendUtility.php
- typo3/sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php 0 additions, 10 deletions.../sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php
- typo3/sysext/core/Classes/DataHandling/DataHandler.php 40 additions, 122 deletionstypo3/sysext/core/Classes/DataHandling/DataHandler.php
- typo3/sysext/core/Classes/DataHandling/PlaceholderShadowColumnsResolver.php 0 additions, 13 deletions...Classes/DataHandling/PlaceholderShadowColumnsResolver.php
- typo3/sysext/core/Classes/DataHandling/PlainDataResolver.php 9 additions, 9 deletionstypo3/sysext/core/Classes/DataHandling/PlainDataResolver.php
- typo3/sysext/core/Classes/Database/Query/Restriction/WorkspaceRestriction.php 10 additions, 3 deletions...asses/Database/Query/Restriction/WorkspaceRestriction.php
- typo3/sysext/core/Classes/Database/ReferenceIndex.php 2 additions, 2 deletionstypo3/sysext/core/Classes/Database/ReferenceIndex.php
- typo3/sysext/core/Classes/Domain/Repository/PageRepository.php 23 additions, 73 deletions.../sysext/core/Classes/Domain/Repository/PageRepository.php
- typo3/sysext/core/Classes/Migrations/TcaMigration.php 20 additions, 0 deletionstypo3/sysext/core/Classes/Migrations/TcaMigration.php
- typo3/sysext/core/Classes/Routing/PageSlugCandidateProvider.php 1 addition, 1 deletion...sysext/core/Classes/Routing/PageSlugCandidateProvider.php
- typo3/sysext/core/Classes/Utility/RootlineUtility.php 2 additions, 2 deletionstypo3/sysext/core/Classes/Utility/RootlineUtility.php
- typo3/sysext/core/Classes/Versioning/VersionState.php 24 additions, 19 deletionstypo3/sysext/core/Classes/Versioning/VersionState.php
- typo3/sysext/core/Configuration/TCA/sys_file_reference.php 0 additions, 2 deletionstypo3/sysext/core/Configuration/TCA/sys_file_reference.php
- typo3/sysext/core/Documentation/Changelog/master/Breaking-92497-WorkspacesMovePlaceholdersRemoved.rst 99 additions, 0 deletions...ster/Breaking-92497-WorkspacesMovePlaceholdersRemoved.rst
- typo3/sysext/core/Tests/Functional/Domain/Repository/PageRepositoryTest.php 4 additions, 3 deletions...Tests/Functional/Domain/Repository/PageRepositoryTest.php
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/Overrides/tt_content.php 0 additions, 1 deletion.../irre_tutorial/Configuration/TCA/Overrides/tt_content.php
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1ncsv_hotel.php 0 additions, 1 deletion...utorial/Configuration/TCA/tx_irretutorial_1ncsv_hotel.php
Please register or sign in to comment