Bug #68494
closedWorkspaces, move-placeholder for table "pages_language_overlay" processed although it's not supported
100%
Description
Debugging SQL errors in frontend (Unknown column 't3ver_move_id' in 'where clause') I discovered that the reason is inside the class TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend.
In line 782++, there is the following consition
if (!empty($pageRepository->versioningWorkspaceId) && !empty($GLOBALS['TCA'][$tableName]['ctrl']['versioningWS']) && $GLOBALS['TCA'][$tableName]['ctrl']['versioningWS'] >= 2 && count($rows) === 1 ) { [...] }
The problem is, that this condition is TRUE for the table "pages_language_overlay" while it probably shouldn't (there is no field t3ver_move_id in TCA).
This condition is TRUE because of the test $GLOBALS['TCA'][$tableName]['ctrl']['versioningWS'] >= 2
.
For table "pages_language_overlay" the value $GLOBALS['TCA'][$tableName]['ctrl']['versioningWS'] is a boolean and TRUE, so the check is TRUE >= 2
which is TRUE.
I suppose the code should get corrected to the following version:
if (!empty($pageRepository->versioningWorkspaceId) && !empty($GLOBALS['TCA'][$tableName]['ctrl']['versioningWS']) && (is_int($GLOBALS['TCA'][$tableName]['ctrl']['versioningWS']) && $GLOBALS['TCA'][$tableName]['ctrl']['versioningWS'] >= 2) && count($rows) === 1 ) { [...] }
Updated by Susanne Moog over 9 years ago
Hey,
thanks for finding this bug. Would you mind creating a patch? You can find a howto here: https://wiki.typo3.org/Contribution_Walkthrough_Tutorials
Cheers,
Susi
Updated by Gerrit Code Review over 9 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42064
Updated by Artur Cichosz over 9 years ago
Hi,
I made a change request for the master branch http://review.typo3.org/42064 to be backported to 6.2.
Updated by Gerrit Code Review over 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42064
Updated by Gerrit Code Review over 9 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42064
Updated by Gerrit Code Review over 9 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42573
Updated by Anonymous over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 9c431cd6e3ba2967d23522c7d6236a4ead5054ac.