R4M
November 11, 2021, 10:22am
1
Heute ist mit bei einer Testumgebung aufgefallen, dass sich die Inhaltstypen unter PHP8 nicht mehr anzeigen lassen. In einem Shop mit SW 5.7.5 und PHP 8.0.12 kommt es zu dieser Fehlermeldung:
Fatal error: Uncaught TypeError:
Cannot access offset of type string on string in /var/.../var/cache/production_202110191330/templates/frontend_Responsive_de_DE_1_secure/04/...0.snippet.index.tpl.php:1047 Stack trace:
#0 /var/.../var/cache/production_202110191330/templates/frontend_Responsive_de_DE_1_secure/04/3d/...0.snippet.index.tpl.php(314): content_618cebb89d08c8_00713242()
#1 /var/.../engine/Library/Smarty/sysplugins/smarty_internal_templatebase.php(180): content_618cebb8ca61f3_44049714()
#2 /var/.../engine/Library/Enlight/View/Default.php(291): Smarty_Internal_TemplateBase->fetch()
#3 /var/.../engine/Library/Enlight/Controller/Plugins/ViewRenderer/Bootstrap.php(180): Enlight_View_Default->render()
#4 /var/.../engine/Library/Enlight/Controller/Plugins/ViewRenderer/Bootstrap.php(207): Enlight_Controller_Plugins_ViewRenderer_Bootstrap->renderTemplate()
#5 /var/.../engine/Library/Enlight/Controller/Plugins/ViewRenderer/Bootstrap.php(124): Enlight_Controller_Plugins_ViewRenderer_Bootstrap->render()
#6 /var/.../engine/Library/Enlight/Event/Handler/Default.php(90): Enlight_Controller_Plugins_ViewRenderer_Bootstrap->onPostDispatch()
#7 /var/.../engine/Library/Enlight/Event/EventManager.php(208): Enlight_Event_Handler_Default->execute()
#8 /var/.../engine/Library/Enlight/Controller/Action.php(224): Enlight_Event_EventManager->notify()
#9 /var/.../engine/Library/Enlight/Controller/Dispatcher/Default.php(461): Enlight_Controller_Action->dispatch()
#10 /var/.../engine/Library/Enlight/Controller/Front.php(225): Enlight_Controller_Dispatcher_Default->dispatch()
#11 /var/.../engine/Shopware/Kernel.php(197): Enlight_Controller_Front->dispatch()
#12 /var/.../vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(85): Shopware\Kernel->handle()
#13 /var/.../vendor/symfony/http-kernel/HttpCache/HttpCache.php(479): Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle()
#14 /var/.../engine/Shopware/Components/HttpCache/AppCache.php(262): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward()
#15 /var/.../vendor/symfony/http-kernel/HttpCache/HttpCache.php(452): Shopware\Components\HttpCache\AppCache->forward()
#16 /var/.../vendor/symfony/http-kernel/HttpCache/HttpCache.php(346): Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch()
#17 /var/.../engine/Shopware/Components/HttpCache/AppCache.php(189): Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup()
#18 /var/.../vendor/symfony/http-kernel/HttpCache/HttpCache.php(224): Shopware\Components\HttpCache\AppCache->lookup()
#19 /var/.../engine/Shopware/Components/HttpCache/AppCache.php(114): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle()
#20 /var/.../shopware.php(122): Shopware\Components\HttpCache\AppCache->handle()
#21 {main} thrown in /var/.../var/cache/production_202110191330/templates/frontend_Responsive_de_DE_1_secure/04/...0.snippet.index.tpl.php on line 1047
Den Cache leeren bringt gar nichts - der Fehler bleibt. Nach Umschaltung auf PHP 7.4.x ist alles wieder sichtbar. Für mich jetzt nicht so wichtig, sollte allerdings mal mit erwähnt werden.
Hallo @R4M
wenn du das Problem nachstellen kannst, erstell gerne ein Ticket dazu
Viele Grüße aus Schöppingen
Michael Telgmann
Ich habe entweder das selbe oder ein Ähnliches Problem:
[23-May-2023 10:01:35 Europe/Berlin] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /html/shopware/var/cache/production_202211020949/templates/frontend_SLResponsive_de_DE_1_secure/ac/e5/ae/ace5ae70e23bafe39368e25ba2dab25c70c60a45.snippet.component_category_teaser.tpl.php:41
Stack trace:
#0 /html/shopware/engine/Library/Smarty/sysplugins/smarty_internal_templatebase.php(180): content_646c709d390742_92666116(Object(Enlight_Template_Default))
#1 /html/shopware/engine/Library/Smarty/sysplugins/smarty_internal_template.php(286): Smarty_Internal_TemplateBase->fetch(Object(Enlight_Template_Default), NULL, NULL, NULL, false, false, true)
#2 /html/shopware/var/cache/production_202211020949/templates/frontend_SLResponsive_de_DE_1_secure/5c/42/cf/5c42cf45eed51c8afba33c02ac40fb1183336c54.snippet.index.tpl.php(178): Smarty_Internal_Template->getSubTemplate('...', NULL, '...', 0, NULL, Array, 0)
#3 /html/shopware/engine/Library/Smarty/sysplugins/smarty_internal_templatebase.php(180): content_646c709ccc48b8_02660255(Object(Enlight_Template_Default))
#4 /html/shopware/engine/Library/Enlight/View/Default.php(286): Smarty_Internal_TemplateBase->fetch()
#5 /html/shopware/engine/Library/Enlight/Controller/Plugins/ViewRenderer/Bootstrap.php(180): Enlight_View_Default->render(Object(Enlight_Template_Default))
#6 /html/shopware/engine/Library/Enlight/Controller/Plugins/ViewRenderer/Bootstrap.php(207): Enlight_Controller_Plugins_ViewRenderer_Bootstrap->renderTemplate(Object(Enlight_Template_Default))
#7 /html/shopware/engine/Library/Enlight/Controller/Plugins/ViewRenderer/Bootstrap.php(124): Enlight_Controller_Plugins_ViewRenderer_Bootstrap->render()
#8 /html/shopware/engine/Library/Enlight/Event/Handler/Default.php(90): Enlight_Controller_Plugins_ViewRenderer_Bootstrap->onPostDispatch(Object(Enlight_Controller_ActionEventArgs))
#9 /html/shopware/engine/Library/Enlight/Event/EventManager.php(207): Enlight_Event_Handler_Default->execute(Object(Enlight_Controller_ActionEventArgs))
#10 /html/shopware/engine/Library/Enlight/Controller/Action.php(229): Enlight_Event_EventManager->notify('...', Object(Enlight_Controller_ActionEventArgs))
#11 /html/shopware/engine/Library/Enlight/Controller/Dispatcher/Default.php(467): Enlight_Controller_Action->dispatch('...')
#12 /html/shopware/engine/Library/Enlight/Controller/Front.php(225): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp))
#13 /html/shopware/engine/Shopware/Kernel.php(197): Enlight_Controller_Front->dispatch()
#14 /html/shopware/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(85): Shopware\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(479): Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle(Object(Shopware\Kernel), Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /html/shopware/engine/Shopware/Components/HttpCache/AppCache.php(266): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL)
#17 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(452): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true)
#18 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(346): Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch(Object(Symfony\Component\HttpFoundation\Request), true)
#19 /html/shopware/engine/Shopware/Components/HttpCache/AppCache.php(192): Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup(Object(Symfony\Component\HttpFoundation\Request), true)
#20 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(224): Shopware\Components\HttpCache\AppCache->lookup(Object(Symfony\Component\HttpFoundation\Request), true)
#21 /html/shopware/engine/Shopware/Components/HttpCache/AppCache.php(117): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle(Object(Symfony\Component\HttpFoundation\Request), 2, true)
#22 /html/shopware/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php(96): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request), 2, true)
#23 /html/shopware/var/cache/production_202211020949/html/en/66/d5/a228bf36e4514e009216c12251ab5b1417ab6756bca3783689f848f1477c(23): Symfony\Component\HttpKernel\HttpCache\AbstractSurrogate->handle(Object(Shopware\Components\HttpCache\AppCache), '...', '', false)
#24 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(637): include('...')
#25 /html/shopware/vendor/symfony/http-kernel/HttpCache/HttpCache.php(227): Symfony\Component\HttpKernel\HttpCache\HttpCache->restoreResponseBody(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Component\HttpFoundation\Response))
#26 /html/shopware/engine/Shopware/Components/HttpCache/AppCache.php(117): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /html/shopware/shopware.php(122): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request))
#28 {main}
thrown in /html/shopware/var/cache/production_202211020949/templates/frontend_SLResponsive_de_DE_1_secure/ac/e5/ae/ace5ae70e23bafe39368e25ba2dab25c70c60a45.snippet.component_category_teaser.tpl.php on line 41
Kann mir jemand helfen bitte?