Project

General

Profile

Actions

Bug #53898

closed

Unused code in PageLayoutView (~100 lines)

Added by Bernhard Kraft over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Code Cleanup
Target version:
Start date:
2013-11-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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)

[1] source:typo3/sysext/backend/Classes/Controller/PageLayoutController.php@51e23edaf7d518e05293874ac4b631db77594da9#L907

[2] source:typo3/sysext/backend/Classes/View/PageLayoutView.php@51e23edaf7d518e05293874ac4b631db77594da9#L649

[3] source:typo3/sysext/backend/Classes/Controller/PageLayoutController.php@51e23edaf7d518e05293874ac4b631db77594da9#L529


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #39967: mod.SHARED.colPos_list is not taken into account any moreClosed2012-08-19

Actions
Actions #1

Updated by Gerrit Code Review over 10 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

Actions #2

Updated by Gerrit Code Review over 10 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

Actions #3

Updated by Gerrit Code Review over 10 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

Actions #4

Updated by Gerrit Code Review over 10 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

Actions #5

Updated by Gerrit Code Review over 10 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

Actions #6

Updated by Jo Hasenau over 10 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.

Actions #7

Updated by Markus Klein about 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.

Actions #8

Updated by Gerrit Code Review over 9 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

Actions #9

Updated by Mathias Schreiber over 9 years ago

  • Target version changed from next-patchlevel to 7.1 (Cleanup)
Actions #10

Updated by Anja Leichsenring about 9 years ago

  • Sprint Focus set to On Location Sprint
Actions #11

Updated by Gerrit Code Review about 9 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

Actions #12

Updated by Gerrit Code Review about 9 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

Actions #13

Updated by Jan Helke about 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #14

Updated by Anja Leichsenring over 8 years ago

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

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF