numero2 / contao-deepl

DeepL powered translations in the Contao Backend.
GNU Lesser General Public License v3.0
5 stars 0 forks source link

Error with TL_JAVASCRIPT #1

Closed de-es closed 3 weeks ago

de-es commented 3 weeks ago

PHP 8.3 Contao 5.3.13 Official Demo contao-deepl 1.0

Just a quick find while testing:

[2024-08-26T16:43:34.771502+02:00] php.WARNING: Warning: Undefined global variable $TL_JAVASCRIPT {"exception":"[object] (ErrorException(code: 0): Warning: Undefined global variable $TL_JAVASCRIPT at /srv/contao/contao5/vendor/numero2/contao-deepl/src/EventListener/DataContainer/ButtonListener.php:145)"} {"request_uri":"https://contao5.contao.internal/contao?act=edit&do=article&id=173&ref=hLBm38nW&table=tl_content","request_method":"GET"}
[2024-08-26T16:43:34.771768+02:00] request.CRITICAL: Uncaught PHP Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, null given" at ButtonListener.php line 145 {"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, null given at /srv/contao/contao5/vendor/numero2/contao-deepl/src/EventListener/DataContainer/ButtonListener.php:145)"} {"request_uri":"https://contao5.contao.internal/contao?act=edit&do=article&id=173&ref=hLBm38nW&table=tl_content","request_method":"GET"}
bennyborn commented 3 weeks ago

Thanks @de-es