Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[!!!][TASK] Do not handle deleted records in reference index
Keeping relation information for soft deleted records in sys_refindex is quite useless: When records are undeleted, the reference index is updated to recreate rows. Additionally, the deleted handling was incomplete, especially if a record on the 'right' side of the relation got deleted. The patch drops the deleted field from the table and prevents adding relations for soft deleted rows. Furthermore, visibility of a couple of properties and methods is changed to protected and a series of not used methods is removed. Note the hash sums change due to the removal of the deleted field. The CLI command "bin/typo3 referenceindex:update" will update hashes and will drop obsolete deleted rows. Change-Id: I58d7a904a6b4c555529b7c70e45d56ccb498f77f Resolves: #93029 Releases: master Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66968 Tested-by: Oliver Bartsch <bo@cedev.de> Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Benni Mack <benni@typo3.org> Reviewed-by: Oliver Bartsch <bo@cedev.de> Reviewed-by: Benni Mack <benni@typo3.org>
- Loading branch information
Showing
860 changed files
with
11,518 additions
and
11,707 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
...ntation/Changelog/master/Breaking-93029-DroppedDeletedFieldFromSys_refindex.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
.. include:: ../../Includes.txt | ||
|
||
========================================================== | ||
Breaking: #93029 - Dropped deleted field from sys_refindex | ||
========================================================== | ||
|
||
See :issue:`93029` | ||
|
||
Description | ||
=========== | ||
|
||
The database field :sql:`deleted` has been removed from table | ||
:sql:`sys_refindex`. Therefore, the table does no longer store | ||
relations between soft deleted records. | ||
|
||
Following properties and methods of class | ||
:php:`TYPO3\CMS\Core\Database\ReferenceIndex` have been set to | ||
protected: | ||
|
||
* :php:`temp_flexRelations` | ||
* :php:`relations` - not scanned by extension scanner | ||
* :php:`hashVersion` | ||
* :php:`getWorkspaceId()` - not scanned by extension scanner | ||
* :php:`getRelations_procDB()` | ||
* :php:`setReferenceValue_dbRels()` | ||
* :php:`setReferenceValue_softreferences()` | ||
* :php:`isReferenceField()` - not scanned by extension scanner | ||
|
||
Following methods of class :php:`TYPO3\CMS\Core\Database\ReferenceIndex` | ||
have been removed: | ||
|
||
* :php:`generateRefIndexData()` | ||
* :php:`createEntryData()` | ||
* :php:`createEntryData_dbRels()` | ||
* :php:`createEntryData_softreferences()` | ||
|
||
|
||
Impact | ||
====== | ||
|
||
Accessing the properties of class :php:`ReferenceIndex` or calling | ||
dropped or protected methods will raise fatal PHP errors. Querying | ||
the :sql:`deleted` field of table :sql:`sys_refindex` will raise a | ||
doctrine dbal exception. | ||
|
||
|
||
Affected Installations | ||
====================== | ||
|
||
The hash sums of existing table rows change. The reference index | ||
should be updated, typically by using the CLI command | ||
:php:`bin/typo3 referenceindex:update` | ||
|
||
Codewise, instances with extensions that query table :sql:`sys_refindex` | ||
or use class :php:`ReferenceIndex` may be affected. The extension | ||
scanner helps to find some usages. | ||
|
||
|
||
Migration | ||
========= | ||
|
||
Use the CLI command :php:`bin/typo3 referenceindex:update` to update | ||
the reference index. | ||
|
||
The :sql:`sys_refindex.deleted` field should be dropped from database | ||
queries. | ||
|
||
When accessing class :php:`ReferenceIndex`, use the main API method | ||
:php:`->updateRefIndexTable()`, plus a couple of other less often | ||
used methods. | ||
|
||
.. index:: Database, PHP-API, PartiallyScanned, ext:core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.