Project

General

Profile

Actions

Bug #24232

closed

tslib_menu and tslib_Xmenu calls stdwrap on $GLOBALS['TSFE']->cObj instead of this->parent_cObj

Added by Thomas Maroschik almost 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-11-29
Due date:
% Done:

0%

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

Description

Situation:
When having content elements of type "menu/sitemap" and using the subtype "Menu of these pages" then tslib_menu parses the values of config special.value with tslib_content.

Problem:
tslib_menu and tslib_Xmenu calls stdwrap on $GLOBALS['TSFE']->cObj instead of $this->parent_cObj which is not necessarily the same. tslib_content is not a singleton. $GLOBALS['TSFE']->cObj->data holds the data of the current page, whereas $this->parent_cObj->data holds the data of the calling content element or page

Solution:
Replace every occurence of $GLOBALS['TSFE']->cObj with $this->parent_cObj.
Attached Patch fixes the Problem.

(issue imported from #M16601)


Files

tslib_menu_cObj_reference_16601.patch (3.93 KB) tslib_menu_cObj_reference_16601.patch Administrator Admin, 2010-11-29 13:59

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #24105: Optimize stdWrap usage for tslib_menuClosedSusanne Moog2010-11-17

Actions
Has duplicate TYPO3 Core - Bug #24260: Broken sitemapsClosedErnesto Baschny2010-12-01

Actions
Actions #1

Updated by Jo Hasenau almost 14 years ago

+1 by reading

Actions #2

Updated by Ernesto Baschny almost 14 years ago

Only the two stdWrap calls was indeed wrongly changed in #16446 (rev.
9474 [1]).

The calls to ->callUserFunction and ->exec_getQuery were
always referencing GLOBALS['TSFE'] so this change also adds a new
"feature" in that we support now the current ->data in these places as well.

(e.g. callUserFunction can now access the correct "parent" cObject,
which is passed on to the userFunction class as member variable
$this->cObj).

Committed it to trunk rev. 9733.

[1] http://forge.typo3.org/repositories/revision/typo3v4-core/9474

Actions #3

Updated by Susanne Moog over 13 years ago

  • Target version deleted (4.5.0)
Actions

Also available in: Atom PDF