Bug #58339
closedWrong returning from ->extGetFeAdminValue
100%
Description
$GLOBALS['BE_USER']->adminPanel->extGetFeAdminValue('preview', 'simulateUserGroup'); or $GLOBALS['BE_USER']->adminPanel->extGetFeAdminValue('preview', 'simulateDate');
returns 1 if they set to 0
In ->extGetFeAdminValue it will return the value from override.preview = 1 if e.g. 'override.preview.simulateUserGroup' is not set, empty or 0
I think asking for 'override.preview.simulateUserGroup' and returning 'override.preview' is a wrong behavior.
admPanel { ... override.preview = 1 override.preview.simulateUserGroup = 0 override.preview.simulateDate = 0 ... }
My Reasons for that:
With EXT:simulatebe i have an FE User and BE User online. The Adminpanel is hidden. To Respect the Usergroups from the FE User I have to set simulateUserGroup to False but will have the preview = 1 at the same time.
The same with simulateDate. I show content that depends on $GLOBALS['SIM_EXEC_TIME'] but this is always '1' when I logged in and have editing rights.
Fix: Change
if ($val && $GLOBALS['BE_USER']->extAdminConfig['override.'][$sectionName . '.'][$val]) {
in /typo3/sysext/frontend/Classes/View/AdminPanelView.php to
if ($val && isset($GLOBALS['BE_USER']->extAdminConfig['override.'][$sectionName . '.'][$val])) {
If nothing is set the behavior is like before (so i assume nothing will break), but it returns not '1' if '= ' or '= 0' is set.
This is a bug in older t3cms versions too.
Files
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/29730
Updated by Markus Klein over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 3b5196b6216131700b50acc3c8478558b4ab72bd.