Project

General

Profile

Actions

Bug #92375

closed

Undefined index: AdminPanel in fluid/Classes/Core/ViewHelper/ViewHelperResolver.php on line 65

Added by David Bruchmann about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2020-09-22
Due date:
% Done:

100%

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

Description

The errormessage

Undefined index: AdminPanel in fluid/Classes/Core/ViewHelper/ViewHelperResolver.php on line 65

is shown in frontend.

The code in fluid is looking like this, line 65 is marked with ">>":

    public function __construct()
    {
        $this->namespaces = $GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces'];
        if (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_FE && $this->getBackendUser() instanceof BackendUserAuthentication) {
>>          $configuration = $this->getBackendUser()->uc['AdminPanel'];
            if (isset($configuration['preview_showFluidDebug']) && $configuration['preview_showFluidDebug']) {
                $this->namespaces['f'][] = 'TYPO3\\CMS\\Fluid\\ViewHelpers\\Debug';
            }
        }
    }

I think here should be probably a check if the variable exists in "uc", if I'm not wrong it might never be set at all and it could be quite common that this error is shown. I don't know the trigger though, therefore have no idea why I see this error for the first time.
A backtrace longer than two elements is killing the instance, but here it is:

[0]=> array(7) {
    ["file"]=> string(97) "typo3/sysext/core/Classes/Utility/GeneralUtility.php" 
    ["line"]=> int(3423)
    ["function"]=> string(11) "__construct" 
    ["class"]=> string(50) "TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperResolver" 
    ["object"]=> object(TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperResolver)#1485 (2) {
        ["resolvedViewHelperClassNames":protected]=> array(0) { }
        ["namespaces":protected]=> array(3) {
            ["core"]=> array(1) {
                [0]=> string(26) "TYPO3\CMS\Core\ViewHelpers" 
            }
            ["f"]=> array(2) {
                [0]=> string(28) "TYPO3Fluid\Fluid\ViewHelpers" 
                [1]=> string(27) "TYPO3\CMS\Fluid\ViewHelpers" 
            }
            ["formvh"]=> array(1) {
                [0]=> string(26) "TYPO3\CMS\Form\ViewHelpers" 
            }
        }
    }
    ["type"]=> string(2) "->" 
    ["args"]=> array(0) { }
}
[1]=> array(6) {
    ["file"]=> string(104) "typo3/sysext/extbase/Classes/Object/Container/Container.php" 
    ["line"]=> int(194)
    ["function"]=> string(12) "makeInstance" 
    ["class"]=> string(37) "TYPO3\CMS\Core\Utility\GeneralUtility" 
    ["type"]=> string(2) "::" 
    ["args"]=> array(1) {
        [0]=> string(50) "TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperResolver" 
    }
}

Actions

Also available in: Atom PDF