Hi,
I am using the OSM street map plugin in Piwigo 14. Unfortunately, i keep getting the following error message:
Warning: Undefined array key "OSMJS" in /mnt/web616/b1/84/534484/htdocs/andy-schulz/photos/_data/templates_c/19zrc6l_1vndtuw^fb9181998170d16bd981d8c5821866f3b47e39be_0.file.picture.tpl.php on line 298 Warning: Attempt to read property "value" on null in /mnt/web616/b1/84/534484/htdocs/andy-schulz/photos/_data/templates_c/19zrc6l_1vndtuw^fb9181998170d16bd981d8c5821866f3b47e39be_0.file.picture.tpl.php on line 298
The message is shown only for image files without GPS information. Pages showing images with GPS information are displayed correctly, however, the map is shown only partially. But this seems to be another problem.
Anybody with any ideas how to fix the osm warning issue?
Thanks, Andy
Piwigo URL: https://andy-schulz.de/andy-schulz/photos/
Offline
Hi,
check file: 'picture.inc.php'.
if line 62 (around) says:
{if $OSMJS}
,
change it to
{if isset($OSMJS)}
hth
Offline
Hi gueba.
thanks for your input. I found the file in /andy-schulz/photos/plugins/piwigo-openstreetmap, changed it as shown in your message, and double checked - but nothing chnaged. Could there be a second file with the same name, but in another place?
Regards
Andy
Offline
You will have to delete compiled templates:
Tools --> Maintenance --> Purge compiled templates
or delete files in '/andy-schulz/photos/_data/templates_c/'
The templates will be compiled automatically.
Offline
Would be nice to know, if it works or not.
Offline
Hi gueba,
sorry, I was busy. Yes, it works perfectly, the warning message is gone. I used the tools/maintenace way. Everything seems to be so easy - at least, when you know what you are doing. Thanks a lot.
Andy
Offline
Hi,
There has been some recent updates made to OSM. Including making it PHP 8 compatible, this warning has been fixed on the github version of the plugin. And will be fixed for others when a new version of the plugin gets published.
Offline
Hi hannah,
thanks for the information. My Piwigo installation is already running release 13c of the OSM plugin. Obviously, it was updated together with Piwigo 14.
Andy
Offline