WapplerSystems / ws_slider

GNU General Public License v2.0
3 stars 2 forks source link

TYPO3 12.4.6: PHP error in backend #37

Open terminal8-af opened 1 year ago

terminal8-af commented 1 year ago

When trying to edit the ws_slider element in the backend, the following error happens:

PHP Warning: Undefined array key "uid" in /typo3_src-12.4.6/vendor/symfony/expression-language/Node/GetAttrNode.php line 130

The slider works fine in the frontend.

LukasHoge commented 10 months ago

I have the same problem, is there a solution yet?

svewap commented 10 months ago

Can someone share a stack trace, where I can see the function of the ws_slider extension which leads to this error?

LukasHoge commented 10 months ago

at TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->getFromCache(object(TYPO3\CMS\Core\Http\ServerRequest)) in /var/www/html/typo3conf/ext/ws_slider/Classes/Service/TypoScriptService.php line 87

    $typoScriptFrontendController = $GLOBALS['TSFE'];
    $typoScriptFrontendController->rootLine = $rootLine;

    $request = new ServerRequest();
    $request = $typoScriptFrontendController->getFromCache($request);

    $settingsTree = $request->getAttribute('frontend.typoscript')->getSetupTree();

    if ($unsetTSFE) {

at WapplerSystems\WsSlider\Service\TypoScriptService::getTypoScript(1) in /var/www/html/typo3conf/ext/ws_slider/Classes/FlexForm/FlexFormParsingModifyEventListener.php line 48

        $pageTs = BackendUtility::getPagesTSconfig($row['pid']);

        $identifier['pageTs'] = $pageTs['tx_wsslider.'] ?? [];

        $typoscript = TypoScriptService::getTypoScript($row['pid']);

        $tsSettings = TypoScriptService::getTypoScriptValueByPath($typoscript->toArray(),'plugin.tx_wsslider.settings');
        $defaultValue = null;
        if (isset($tsSettings['defaultRenderer'])) $defaultValue = $tsSettings['defaultRenderer'];
LukasHoge commented 10 months ago

Do you need more information about the problem? or is there already a solution?

svewap commented 10 months ago

I suspect the problem is caused by the TypoScript. This produces a warning that can be ignored depending on the settings of the TYPO3 system. I would therefore recommend checking the TypoScript template for incompatibilities or optionally reducing the error level by one place so that warnings no longer cause the code to abort. I myself could only use a try-catch here.