Bug #62263

eID gives Invalid argument supplied for foreach() RootlineUtility.php line 271

Added by Job Rutgers about 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-10-15
Due date:
% Done:

0%

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

Description

I get a warning when I use an eID

PHP Warning: Invalid argument supplied for foreach() in typo3/sysext/core/Classes/Utility/RootlineUtility.php line 271

I use the following settings

$TSFE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController', $GLOBALS['TYPO3_CONF_VARS'], 0, 0);
\TYPO3\CMS\Frontend\Utility\EidUtility::initLanguage();
$TSFE->initFEuser();
$TSFE->set_no_cache();
$TSFE->checkAlternativeIdMethods();
$TSFE->determineId();
$TSFE->initTemplate();
$TSFE->getConfigArray();
\TYPO3\CMS\Core\Core\Bootstrap::getInstance();
$TSFE->cObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer');
$TSFE->settingLanguage();
$TSFE->settingLocale();

History

#1 Updated by Job Rutgers about 5 years ago

I found a solution in https://github.com/helhum/ajax_example from Helmut Hummel

use \TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
use TYPO3\CMS\Frontend\Utility\EidUtility;

GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Core\\Bootstrap');
$feUserObj = EidUtility::initFeUser();
$pageId = GeneralUtility::_GET('id') ?: 1;
$typoScriptFrontendController = GeneralUtility::makeInstance(
    'TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController',
    $GLOBALS['TYPO3_CONF_VARS'],
    $pageId,
    0,
    TRUE
);
$GLOBALS['TSFE'] = $typoScriptFrontendController;
$typoScriptFrontendController->connectToDB();
$typoScriptFrontendController->fe_user = $feUserObj;
$typoScriptFrontendController->set_no_cache();
$typoScriptFrontendController->id = $pageId;
$typoScriptFrontendController->determineId();
$typoScriptFrontendController->getCompressedTCarray();
$typoScriptFrontendController->initTemplate();
$typoScriptFrontendController->getConfigArray();
$typoScriptFrontendController->includeTCA();
$typoScriptFrontendController->cObj = GeneralUtility::makeInstance('TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer');

#2 Updated by Markus Klein about 5 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (next-patchlevel)

Can we close this?

#3 Updated by Alexander Opitz almost 5 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Also available in: Atom PDF