Project

General

Profile

Actions

Bug #68494

closed

Workspaces, move-placeholder for table "pages_language_overlay" processed although it's not supported

Added by Artur Cichosz over 9 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2015-07-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

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
) {
[...]
}
Actions #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

Actions #2

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

Actions #3

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.

Actions #4

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

Actions #5

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

Actions #6

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

Actions #7

Updated by Anonymous over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF