Issue Bug Closed

#82122Typo3DbBackend::doLanguageAndWorkspaceOverlay ignores pages l18n_cfg

Christian Weiske 08/17/17, 13:51 updated 03/01/19, 19:48

Description

Page records have a l18n_cfg bit field that has one bit for “Hide page if no translation for current language exists”.

TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend::doLanguageAndWorkspaceOverlay() does ignore this setting, so that pages without a translation into the current language are returned despite the “hide page if not translation” setting being active.

The method relies on
TYPO3\CMS\Frontend\Page\PageRepository::getPagesOverlay(), which also ignores l18n_cfg.

One of those methods should take care of handling the page l18n_cfg property.

Steps to reproduce:

  1. Setup a second language in TYPO3
  2. Create a page with “Hide page if no translation for current language exists” set
  3. In the frontend page with L=1, use Extbase\Persistence\Generic\Query to fetch this page
  4. The page will be returned, but should not

Reviews 2