[BUGFIX] Translated non-published page in workspace breaks live workspace
authorOliver Hader <oliver@typo3.org>
Fri, 2 Nov 2012 14:07:54 +0000 (15:07 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Fri, 2 Nov 2012 14:12:36 +0000 (15:12 +0100)
Translation of pages are stored in pages_language_overlay and
can be managed in workspaces as well. If a new translation is
created in the workspace only, the page module is broken in
the live workspace.

The reason for that is, that workspaces placeholders need to
be ignored if not working on a real workspace.

Change-Id: Ied52a985c3cb1c0796f616679414799d956024d8
Releases: 6.0, 4.7, 4.6, 4.5
Fixes: #42281
Reviewed-on: http://review.typo3.org/16137
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/cms/layout/db_layout.php

index 6265653..73c8db0 100755 (executable)
@@ -1381,7 +1381,8 @@ class SC_db_layout {
                        return $GLOBALS['TYPO3_DB']->exec_SELECTquery(
                                                        'sys_language.*',
                                                        'pages_language_overlay,sys_language',
-                                                       'pages_language_overlay.sys_language_uid=sys_language.uid AND pages_language_overlay.pid='.intval($id).$exQ,
+                                                       'pages_language_overlay.sys_language_uid=sys_language.uid AND pages_language_overlay.pid=' . intval($id) . $exQ .
+                                                               t3lib_BEfunc::versioningPlaceholderClause('pages_language_overlay'),
                                                        'pages_language_overlay.sys_language_uid,sys_language.uid,sys_language.pid,sys_language.tstamp,sys_language.hidden,sys_language.title,sys_language.static_lang_isocode,sys_language.flag',
                                                        'sys_language.title'
                                                );
@@ -1414,4 +1415,4 @@ $SOBE->clearCache();
 $SOBE->main();
 $SOBE->printContent();
 
-?>
\ No newline at end of file
+?>