codefog / contao-haste

Haste is a collection of tools and classes to ease working with Contao
http://codefog.pl/extension/haste.html
MIT License
43 stars 24 forks source link

Error with PHP 8.1 and Contao 4.13.x #213

Closed jankout closed 11 months ago

jankout commented 11 months ago

[2023-08-07T06:48:28.366558+02:00] request.CRITICAL: Uncaught PHP Exception TypeError: "Codefog\HasteBundle\EventListener\AjaxReloadListener::onGetFrontendModule(): Argument #2 ($buffer) must be of type string, null given, called in /www/htdocs/w01954da/kcrehlo.cz/vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php on line 448" at /www/htdocs/w01954da/kcrehlo.cz/vendor/codefog/contao-haste/src/EventListener/AjaxReloadListener.php line 46 {"exception":"[object] (TypeError(code: 0): Codefog\HasteBundle\EventListener\AjaxReloadListener::onGetFrontendModule(): Argument #2 ($buffer) must be of type string, null given, called in /www/htdocs/w01954da/kcrehlo.cz/vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php on line 448 at /www/htdocs/w01954da/kcrehlo.cz/vendor/codefog/contao-haste/src/EventListener/AjaxReloadListener.php:46)"} []

operatorone commented 4 months ago

What was the solution to the error? I have the same issue.

fritzmg commented 4 months ago

@operatorone this is caused by another extension or app customisation that erroneously returns null in a getFrontendModule hook.

operatorone commented 4 months ago

Rolled notification center back to 1.6.18 and lowered the version of haste too. It's working again. Anyway have an update going, might be related to pct extensions or so. These are installed:

"do-while/contao-backupdb-bundle": "^1.5", "league/csv": "^9.6", "premium-contao-themes/pct_theme_installer": "^1.6", "premium-contao-themes/theme_updater": "^1.0", "rsm/rsm-googlerecaptcha-modul": "^1.0", "terminal42/contao-changelanguage": "^3.3", "terminal42/notification_center": "1.6.*"

fritzmg commented 4 months ago

@operatorone in any case this has nothing to do with codefog/contao-haste. This must be fixed in the getFrontendModule hook of the other extension or app customisation.