Issue Bug Closed

#76977DataHandler doesn't recognize doktype for Alternative Page Language the right way

Daniel Siepmann 07/07/16, 12:26 updated 03/11/19, 13:52

Description

It’s possible to configure allowed tables per page type via https://docs.typo3.org/typo3cms/CoreApiReference/PageTypes/Index.html .
As soon as you have configure to not allow “pages” below a specific page type everything works as expected for records of type “pages” but not for “Alternative Page Language”.

The process is handled in TYPO3\CMS\Core\DataHandling\DataHandler::checkValue where:

// Processing special case of field pages.doktype                                         
if (($table === 'pages' || $table === 'pages_language_overlay') && $field === 'doktype') {

Inside this condition, $theWrongTables = $this->doesPageHaveUnallowedTables($id, $value); is called which will do $count = $this->databaseConnection->exec_SELECTcountRows('uid', $table, 'pid=' . (int)$page_uid); so not taking care of the real uid.

*Fix*
The $id passed to doesPageHaveUnallowedTables has to be the real uid, so in case of pages_language_overlay it has to be the pid instead of uid.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.