OMOSde / contao-om-backend

Additional backend tools for Contao 4.4+
GNU Lesser General Public License v3.0
19 stars 5 forks source link

PHP8 Problem? #68

Closed Kahmoon closed 1 year ago

Kahmoon commented 2 years ago

Servus,

ich habe unter contao 4.12.6 om-backend 1.7.1 installiert. Ohne Debugmodus funktioniert soweit alles. Schalte ich den Debug Mode an kommt folgende Meldung. Irgendwas scheint da noch nicht ganz PHP8 kompatibel.

Contao 4.12.6 PHP 8

ErrorException:
Warning: Undefined array key "tables"

  at vendor/omosde/contao-om-backend/src/Resources/contao/config/config.php:108
  at include('/homepages/46/xxx/htdocs/abc-v3/vendor/omosde/contao-om-backend/src/Resources/contao/config/config.php')
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Config.php:179)
  at Contao\Config->initialize()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Config.php:144)
  at Contao\Config::getInstance()
     (vendor/contao/core-bundle/src/Framework/Adapter.php:44)
  at Contao\CoreBundle\Framework\Adapter->__call('getInstance', array())
     (vendor/contao/core-bundle/src/Framework/ContaoFramework.php:301)
  at Contao\CoreBundle\Framework\ContaoFramework->initializeFramework()
     (vendor/contao/core-bundle/src/Framework/ContaoFramework.php:158)
  at Contao\CoreBundle\Framework\ContaoFramework->initialize()
     (vendor/contao/core-bundle/src/HttpKernel/ModelArgumentResolver.php:50)
  at Contao\CoreBundle\HttpKernel\ModelArgumentResolver->supports(object(Request), object(ArgumentMetadata))
     (vendor/symfony/http-kernel/Controller/ArgumentResolver/TraceableValueResolver.php:43)
  at Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver->supports(object(Request), object(ArgumentMetadata))
     (vendor/symfony/http-kernel/Controller/ArgumentResolver.php:52)
  at Symfony\Component\HttpKernel\Controller\ArgumentResolver->getArguments(object(Request), array(object(BackendController), 'loginAction'))
     (vendor/symfony/http-kernel/Controller/TraceableArgumentResolver.php:38)
  at Symfony\Component\HttpKernel\Controller\TraceableArgumentResolver->getArguments(object(Request), array(object(BackendController), 'loginAction'))
     (vendor/symfony/http-kernel/HttpKernel.php:150)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:80)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:201)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (web/index.php:31)

Beim Aktualisieren aller Pakete kommen auch folgende Warnings:

Warning: Undefined array key "deleteConfirm" in /homepages/46/12345/htdocs/12345-v3/vendor/omosde/contao-om-backend/src/Resources/contao/dca/tl_om_backend_element_classes.php on line 63
Warning: Undefined array key "deleteConfirm" in /homepages/46/12345/htdocs/12345-v3/vendor/omosde/contao-om-backend/src/Resources/contao/dca/tl_om_backend_links_main.php on line 69
Warning: Undefined array key "deleteConfirm" in /homepages/46/12345/htdocs/12345-v3/vendor/omosde/contao-om-backend/src/Resources/contao/dca/tl_om_backend_links_top.php on line 69
Warning: Undefined array key "deleteConfirm" in /homepages/46/12345/htdocs/12345-v3/vendor/omosde/contao-om-backend/src/Resources/contao/dca/tl_om_backend_sysinfo.php on line 76

VG

OMOSde commented 2 years ago

Related #67

kartoffelheinz commented 2 years ago

Unter 4.13 existieren die selben Fehler, auch bei Verwendung der aktuellen Master-Version hier aus Github. Contao 4.12+ scheint eine neue Logik zum Laufzeitladen der Übersetzungen eingeführt zu haben, so dass diese wohl nicht schon beim Parsen der DCAs zur Verfügung stehen. Fehler lässt sich problemlos via APP_ENV=dev (in .dev) und dem Aufruf des Installtools reproduzieren bzw. anzeigen.

Kahmoon commented 2 years ago

Problem besteht leider nach wie vor. Gibt es hier einen Workaround? Wir würden gerne PHP 8 verwenden :-(

Contao 4.13.7 PHP 8.0 OM Backend: 1.7.1

Debug Mode Stack Trace

ErrorException:
Warning: Undefined array key "tables"

  at vendor/omosde/contao-om-backend/src/Resources/contao/config/config.php:108
  at include('/homepages/46/xxx/htdocs/xxx-v3/vendor/omosde/contao-om-backend/src/Resources/contao/config/config.php')
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Config.php:198)
  at Contao\Config->initialize()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Config.php:163)
  at Contao\Config::getInstance()
     (vendor/contao/core-bundle/src/Framework/Adapter.php:46)
  at Contao\CoreBundle\Framework\Adapter->__call('getInstance', array())
     (vendor/contao/core-bundle/src/Framework/ContaoFramework.php:277)
  at Contao\CoreBundle\Framework\ContaoFramework->initializeFramework()
     (vendor/contao/core-bundle/src/Framework/ContaoFramework.php:121)
  at Contao\CoreBundle\Framework\ContaoFramework->initialize()
     (vendor/contao/core-bundle/src/HttpKernel/ModelArgumentResolver.php:43)
  at Contao\CoreBundle\HttpKernel\ModelArgumentResolver->supports(object(Request), object(ArgumentMetadata))
     (vendor/symfony/http-kernel/Controller/ArgumentResolver/TraceableValueResolver.php:43)
  at Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver->supports(object(Request), object(ArgumentMetadata))
     (vendor/symfony/http-kernel/Controller/ArgumentResolver.php:51)
  at Symfony\Component\HttpKernel\Controller\ArgumentResolver->getArguments(object(Request), array(object(BackendController), 'loginAction'))
     (vendor/symfony/http-kernel/Controller/TraceableArgumentResolver.php:38)
  at Symfony\Component\HttpKernel\Controller\TraceableArgumentResolver->getArguments(object(Request), array(object(BackendController), 'loginAction'))
     (vendor/symfony/http-kernel/HttpKernel.php:144)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:74)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (web/index.php:44)    
fritzmg commented 1 year ago

This has since been fixed and can be closed.