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)
Updated by Gerrit Code Review almost 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25662
Updated by Gerrit Code Review almost 11 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25662
Updated by Gerrit Code Review almost 11 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25662
Updated by Gerrit Code Review almost 11 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25662
Updated by Gerrit Code Review almost 11 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25662
Updated by Jo Hasenau almost 11 years ago
Actually colPosList should still be available, although it is not, due to a regression linked in #39967.
So before removing this piece of code, I would like to discuss that further.
Updated by Markus Klein over 10 years ago
@Jo:
Bernhard Kraft wrote about this patch on gerrit:
I am not really sure but if I remember it correctly the issue you linked to has nothing to do with this one.
This one is about the "single column view" which is not available since 4.? ... It is an ancient feature of TYPO 3.x
The "function" menu can not even get set to "4" as this option is removed. Let's wait for the result of the discussion you linke to - then take further steps.
Updated by Gerrit Code Review about 10 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/25662
Updated by Mathias Schreiber almost 10 years ago
- Target version changed from next-patchlevel to 7.1 (Cleanup)
Updated by Anja Leichsenring almost 10 years ago
- Sprint Focus set to On Location Sprint
Updated by Gerrit Code Review almost 10 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/25662
Updated by Gerrit Code Review almost 10 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/25662
Updated by Jan Helke over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1e6df9d0a0c158ac2e686cce76144eb5bd9c9405.
Updated by Anja Leichsenring almost 9 years ago
- Sprint Focus deleted (
On Location Sprint)
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed