Project

General

Profile

Actions

Bug #44897

closed

Using tslib_eidtools leads to: "Fatal error: Call to private method tslib_eidtools::getTSFE() from context '"

Added by Christian Platt almost 12 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-01-29
Due date:
% Done:

0%

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

Description

When using a small snippet as eID Part of an extension like the following:

class unsereKlasse {

public function main() {
$feUserObject = tslib_eidtools::initFeUser();
$TSFEObject = tslib_eidtools::getTSFE();
return json_encode(array('myResult' => 'World'));
}

}

$output = t3lib_div::makeInstance('unsereKlasse');
echo $output->main();

however it returns a
"Fatal error: Call to private method tslib_eidtools::getTSFE() from context '"

Which should not be. The error is reproducible.

It seems that the error was entered into typo here
http://git.typo3.org/TYPO3v4/Core.git/commitdiff/0eea8829feb942e2be5de20d3ab2241a9711bfac

Actions #1

Updated by Oliver Hader almost 12 years ago

  • Complexity set to easy
Actions #2

Updated by Jigal van Hemert almost 12 years ago

  • Status changed from New to Needs Feedback

It was meant to create an almost 'dummy' TSFE environment just to initialize the fe user object. In an eID script it is pretty much useless to want an entire TSFE environment; there is no page selected, no page type. Furthermore you use an eID script to have a fast and very minimalistic environment suitable for Ajax responses. If you need a complete environment it's usually best to define a page type for that purpose.

What is the use case to have such a crippled TSFE environment inside an eID script?

Actions #3

Updated by Christian Platt almost 12 years ago

I understand your question,

the pid is given in the script to get the conf of a specific page. But the question is in this case why does it not work, as given in my example (which is of course not complete).

There is nowhere write, that it is private.

I#ll test your advice via page type also.

The goal of my question is to render one or more content elements of a page and give it back to jquery as json.

Actions #4

Updated by Jigal van Hemert over 11 years ago

  • Status changed from Needs Feedback to Closed

Use case is not ideal for eID script (rendering content). No feedback or further information for over 90 days. Closed.

Actions

Also available in: Atom PDF