#82122Typo3DbBackend::doLanguageAndWorkspaceOverlay ignores pages l18n_cfg
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:
- Setup a second language in TYPO3
- Create a page with “Hide page if no translation for current language exists” set
- In the frontend page with
L=1, useExtbase\Persistence\Generic\Queryto fetch this page - The page will be returned, but should not