Bug #53898
closedUnused code in PageLayoutView (~100 lines)
100%
Description
There is an "if" statement [1] which can never be true. The "!" operator binds stronger than "===" which results in the left part of the evaluation to be either TRUE or FALSE - but never "4".
Because of this the linked code block: [2] will never get executed (~100 lines)
In fact this block/piece of code isn't even working properly. Nowadays only the grid is used for PageLayout and as it is know the configuration "mod.SHARED.colPos_list" is not available anymore. So the variable "$this->colPosList" always gets set from the current backend layout [3]. Additionally I couldn't find a place where "$this->MOD_SETTINGS['function']" ever gets set to "4". As mentioned: Grid view is used by default.
Testing: Create a backend layout with only one column and assign it to a page. Change the above mentioned if statement to:
if (TRUE || count($colList) === 1 && !$this->MOD_SETTINGS['function'] === 4) {
Now open the page with the page module: You are now looking at an ancient view of the TYPO3 page module which you probably haven't seen for years.
Solution: Remove the mentioned if statement and code block (around 100 lines)