[BUGFIX] Element Browser should only render default language pages 36/55536/2
authorBenni Mack <benni@typo3.org>
Sat, 3 Feb 2018 19:57:43 +0000 (20:57 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Sat, 3 Feb 2018 20:11:36 +0000 (21:11 +0100)
The Browseable Trees (Element Browser) show pages with
language > 0 (page translations), due to a missing fix
during the pages_language_overlay refactoring.

The patch adds the restriction on deleted pages
and sys_language_uid=0 pages, just like PageTreeView
and the new page tree do it.

Resolves: #83764
Releases: master
Change-Id: I90d76a37a0ee146ea549adcbb3aeff027fe42d26
Reviewed-on: https://review.typo3.org/55536
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Tested-by: Riccardo De Contardi <erredeco@gmail.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/backend/Classes/Tree/View/BrowseTreeView.php

index 3fcce8d..b1f775d 100644 (file)
@@ -89,7 +89,7 @@ class BrowseTreeView extends AbstractTreeView
             }
         }
         // This is very important for making trees of pages: Filtering out deleted pages, pages with no access to and sorting them correctly:
-        parent::init(' AND ' . $this->getBackendUser()->getPagePermsClause(Permission::PAGE_SHOW) . ' ' . $clause . $clauseExcludePidList, 'sorting');
+        parent::init(' AND deleted=0 AND sys_language_uid=0 AND ' . $this->getBackendUser()->getPagePermsClause(Permission::PAGE_SHOW) . ' ' . $clause . $clauseExcludePidList, 'sorting');
         $this->title = $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'];
         $this->MOUNTS = $this->getBackendUser()->returnWebmounts();
         if ($pidList) {