terminal42 / contao-pageimage

MIT License
12 stars 13 forks source link

Undefined array key "hasLink" #52

Closed mlwebworker closed 2 years ago

mlwebworker commented 2 years ago

Fehler : Undefined array key "hasLink" im Debug-Modus

PHP 8.1.2 Contao: 4.12.7 contao-pageimage: 4.1.3

Hier der Stacktrace

ErrorException:
Warning: Undefined array key "hasLink"

  at vendor/terminal42/contao-pageimage/contao/templates/mod_pageimage.html5:6
  at include('/mnt/web023/d3/57/5890957/htdocs/bws-contao4/vendor/terminal42/contao-pageimage/contao/templates/mod_pageimage.html5')
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/TemplateInheritance.php:111)
  at Contao\Template->inherit()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Template.php:300)
  at Contao\Template->parse()
     (vendor/contao/core-bundle/src/Resources/contao/classes/FrontendTemplate.php:45)
  at Contao\FrontendTemplate->parse()
     (vendor/contao/core-bundle/src/Resources/contao/classes/FragmentTemplate.php:36)
  at Contao\FragmentTemplate->compile()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Template.php:327)
  at Contao\Template->getResponse()
     (vendor/contao/core-bundle/src/Resources/contao/classes/FrontendTemplate.php:87)
  at Contao\FrontendTemplate->getResponse()
     (vendor/contao/core-bundle/src/Resources/contao/classes/FragmentTemplate.php:25)
  at Contao\FragmentTemplate->getResponse()
     (vendor/terminal42/contao-pageimage/src/Controller/PageimageController.php:59)
  at Terminal42\PageimageBundle\Controller\PageimageController->getResponse()
     (vendor/contao/core-bundle/src/Controller/FrontendModule/AbstractFrontendModuleController.php:40)
  at Contao\CoreBundle\Controller\FrontendModule\AbstractFrontendModuleController->__invoke()
     (vendor/symfony/http-kernel/HttpKernel.php:152)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:74)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php:86)
  at Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle()
     (vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php:80)
  at Symfony\Component\HttpKernel\Fragment\InlineFragmentRenderer->render()
     (vendor/symfony/http-kernel/Fragment/FragmentHandler.php:85)
  at Symfony\Component\HttpKernel\Fragment\FragmentHandler->render()
     (vendor/contao/core-bundle/src/Fragment/FragmentHandler.php:84)
  at Contao\CoreBundle\Fragment\FragmentHandler->render()
     (vendor/contao/core-bundle/src/Resources/contao/modules/ModuleProxy.php:61)
  at Contao\ModuleProxy->generate()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:421)
  at Contao\Controller::getFrontendModule()
     (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:200)
  at Contao\PageRegular->prepare()
     (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:65)
  at Contao\PageRegular->getResponse()
     (vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:339)
  at Contao\FrontendIndex->renderPage()
     (vendor/symfony/http-kernel/HttpKernel.php:152)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:74)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (web/preview.php:33)                
mlwebworker commented 2 years ago

Eigentlich sollte der Fehler ja in der aktuellen Version von pageimage beseitigt sein, wenn ich das richtig verstehe. Bei mir ist der Fehler im Debug-Modus aber noch vorhanden. Die geänderten Zeilen in der Datei src/PageimageHelper.php sind vorhanden. Das habe ich noch einmal kontrolliert

PHP 8.1.7 Contao: 4.13.5 contao-pageimage: 4.1.5

Hier der Stacktrace

ErrorException:
Warning: Undefined array key "hasLink"

  at vendor/terminal42/contao-pageimage/contao/templates/mod_pageimage.html5:6
  at include('/srv/www/mlweb/public/xxx/contao_4_13_x/vendor/terminal42/contao-pageimage/contao/templates/mod_pageimage.html5')
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/TemplateInheritance.php:108)
  at Contao\Template->inherit()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Template.php:295)
  at Contao\Template->parse()
     (vendor/contao/core-bundle/src/Resources/contao/classes/FrontendTemplate.php:43)
  at Contao\FrontendTemplate->parse()
     (vendor/contao/core-bundle/src/Resources/contao/classes/FragmentTemplate.php:36)
  at Contao\FragmentTemplate->compile()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Template.php:322)
  at Contao\Template->getResponse()
     (vendor/contao/core-bundle/src/Resources/contao/classes/FrontendTemplate.php:85)
  at Contao\FrontendTemplate->getResponse()
     (vendor/contao/core-bundle/src/Resources/contao/classes/FragmentTemplate.php:25)
  at Contao\FragmentTemplate->getResponse()
     (vendor/terminal42/contao-pageimage/src/Controller/PageimageController.php:59)
  at Terminal42\PageimageBundle\Controller\PageimageController->getResponse()
     (vendor/contao/core-bundle/src/Controller/FrontendModule/AbstractFrontendModuleController.php:40)
  at Contao\CoreBundle\Controller\FrontendModule\AbstractFrontendModuleController->__invoke()
     (vendor/symfony/http-kernel/HttpKernel.php:152)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:74)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php:86)
  at Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle()
     (vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php:80)
  at Symfony\Component\HttpKernel\Fragment\InlineFragmentRenderer->render()
     (vendor/symfony/http-kernel/Fragment/FragmentHandler.php:85)
  at Symfony\Component\HttpKernel\Fragment\FragmentHandler->render()
     (vendor/contao/core-bundle/src/Fragment/FragmentHandler.php:69)
  at Contao\CoreBundle\Fragment\FragmentHandler->render()
     (vendor/contao/core-bundle/src/Resources/contao/modules/ModuleProxy.php:60)
  at Contao\ModuleProxy->generate()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:434)
  at Contao\Controller::getFrontendModule()
     (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:199)
  at Contao\PageRegular->prepare()
     (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:60)
  at Contao\PageRegular->getResponse()
     (vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:316)
  at Contao\FrontendIndex->renderPage()
     (vendor/symfony/http-kernel/HttpKernel.php:152)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:74)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/preview.php:46)       
aschempp commented 2 years ago

könntest du mal prüfen ob die Änderung in 7b87fd970605e5e7e6ab938f5218668e27e5d619 den Fehler behebt (und noch alles funktioniert)?

mlwebworker commented 2 years ago

Korrektur durchgeführt und läuft in meinen beiden Installationen problemlos. Danke.

aschempp commented 2 years ago

veröffentlicht als 4.1.6