Bug #22122
closedSIM_EXEC_TIME is always 1 when logged in BE
0%
Description
When I'm logged in BE and preview pages - $GLOBALS['SIM_EXEC_TIME'] always gets == 1.
I got the following TS for the user (cause of feeditadvanced ext):
admPanel {
...
override.preview = 1
override.edit.displayIcons = 1
override.preview.showHiddenRecords = 1
override.preview.showHiddenPages = 1
...
}
Reason:
1) typo3/sysext/cms/tslib/class.tslib_fe.php:781-785
$simTime = $GLOBALS['BE_USER']->adminPanel->extGetFeAdminValue('preview', 'simulateDate');
if ($simTime) {
$GLOBALS['SIM_EXEC_TIME'] = $simTime;
$GLOBALS['SIM_ACCESS_TIME'] = $simTime - ($simTime % 60);
}
So, SIM_EXEC_TIME gets overriden if admPanel.override.preview.simulateDate is not empty. Thats correct.
2) typo3/sysext/cms/tslib/class.tslib_adminpanel.php:197-202
Seems to work incorreclty, because
a) if admPanel.override.preview.simulateDate is present in TS and = 0, this condition fails:
if ($GLOBALS['BE_USER']->extAdminConfig['override.'][$pre . '.'][$val] && $val) {
b) this behaviour is quite strange:
if ($GLOBALS['BE_USER']->extAdminConfig['override.'][$pre]) {
return $GLOBALS['BE_USER']->extAdminConfig['override.'][$pre];
}
It results in: if admPanel.override.preview.simulateDate is not present, admPanel.override.preview is returned instead, which is = 1 in my case.
I suggest to fix line 197 to such:
if (isset($GLOBALS['BE_USER']->extAdminConfig['override.'][$pre . '.'][$val]) && $val) {
so check should be done not for emptyness, but for existence.
(issue imported from #M13544)
Updated by Alexander Opitz over 11 years ago
- Category deleted (
Communication) - Target version deleted (
0)
Mentioned #21925 ( #M13175 ) is another problem.
The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?
Updated by Alexander Opitz over 11 years ago
- Status changed from New to Needs Feedback
Updated by Alexander Opitz about 11 years ago
- Status changed from Needs Feedback to Closed
- Is Regression set to No
No feedback for over 90 days.