netzmacht/contao-leaflet-maps

Passed variable is not an array or object in v3.2.2

havutcuoglu opened this issue · 5 comments

Die Version 3.2.2 verursacht unter Contao 4.9 folgende Fehler: Passed variable is not an array or object

Danach ist es nicht mehr möglich Frontend und Backend aufzurufen. Anbei die Screenshots.

PS: Ich habe während der Contao Update von 4.8 auf 4.9 die Erweiterung von 3.1 auf 3.2 aktualisiert.

Bildschirmfoto 2020-12-25 um 12 08 29
Bildschirmfoto 2020-12-25 um 12 08 51

I cannot confirm it. Have you checked if netzmacht/contao-leaflet-libraries is properly installed at system/modules/leaflet-libs? Does a composer update or cache warmup solve it?

I didn't try to update again on v3.2.2. and fixed the package on 3.1.x
The Problem had also exist, but i clean the cache and the problem was solved.

I can't say the problem will come again if I update to 3.2.2.
Maybe the $GLOBALS['LEAFLET_LIBRARIES'] was Null and not an Array!?

I can try to Update and tell you my result here, but it will take some time.

The information stored in $GLOBALS['LEAFLET_LIBRARIES'] are provided by the contao-leaflet-libs extension and should be available after initializing the contao framework. I have no clue why this error could happen so I'll be glad if you try to figure it out if you have some time.

I will update a old contao version and will install the leaflet map bundle in this week.
If I will have the same problem, I will let you now. Otherwise i will close this issue.

Bildschirmfoto 2021-09-03 um 15 26 56

I get this problem every time if I use cache:clear
Than I fixed this problem by removing the prod and dev cache before clearing the cache

rm -rf var/cache/prod
rm -rf var/cache/dev

than i did:

.../php contao-console cache:clear --no-warmup
.../php contao-console cache:warmup

Wolla! every thing is normal again.

I try it also on other installation and i get the same error.
I can not understand why it did not work with:

.../php vendor/bin/contao-console cache:clear --env=dev
.../php vendor/bin/contao-console cache:clear --env=prod

But with the solution above it works now.