Bug #76977


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

Added by Daniel Siepmann almost 8 years ago. Updated over 5 years ago.

Should have
DataHandler aka TCEmain
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


It's possible to configure allowed tables per page type via .
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.

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.


basic_fix.diff (1.03 KB) basic_fix.diff Daniel Siepmann, 2016-07-20 08:53
Actions #1

Updated by Nicole Cordes almost 8 years ago

  • Assignee set to Nicole Cordes
  • Sprint Focus set to On Location Sprint
Actions #2

Updated by Nicole Cordes almost 8 years ago

  • Status changed from New to Needs Feedback

Hi Daniel,

I would love to be able to reproduce your problem. Would you mind to offer your configuration as well as your use case. I think I understand the problem but I'd like to verify it before solving.

BTW: Do you know how to contribute to the TYPO3 Core using Gerrit as review system? As you already have a solution for your problem, you could easily provide the patch.

Actions #3

Updated by Daniel Siepmann almost 8 years ago

Here is a basic fix that should work.

But as $realPid can be -1 and I don't know all circumstances of this method, I'm not sure whether this will be incompatible with further issues.

TYPO3 should check the real page, thus the pid in case of language overlays.

Actions #4

Updated by Daniel Siepmann almost 8 years ago

Once more I try to describe how to reproduce the issue.

Configure allowed tables via .
Configure one page type to not allow pages, so it's not possible to provide subpages.
Create one page and a language overlay.
Create another page with same uid as the language overlay has. This page should not allow pages.

Try to update the doktype of the language overlay. It will fail as not the pid of the overlay, the real page uid, will be used, but the uid of the language overlay. TYPO3 will look up the page with uid of the overlay, this is configured to not allow overlays.
Thus the editor will get a warning that the table is not allowed.

Actions #5

Updated by Riccardo De Contardi over 7 years ago

  • Status changed from Needs Feedback to New
Actions #6

Updated by Susanne Moog almost 7 years ago

  • Complexity changed from easy to medium
Actions #7

Updated by Anja Leichsenring almost 7 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions #8

Updated by Daniel Siepmann over 5 years ago

  • Status changed from New to Closed

This should be solved with release of 9.x where the table has gone and only pages is left.


Also available in: Atom PDF