Jump to content
TNG Community
XerxX

Empty map in showmap.php

Recommended Posts

XerxX

Hi all,

I get a completely empty map in showmap.php and a PHP Notice.
Can someone please check/confirm this using TNG 13.0.x. I found it using TNG 13.0.2 (never checked it with 13.0.1)

This can be done with the OSM mod (I did) but not with Google maps.
But as I don't have a Google map key I simply entered 123 for the map key, forcing the "Oops!" message:

oopsmap.jpg

I select menu Find -> Cemeteries
I select a cemetery by expanding it as much as possible:

cemexpand.jpg

I click "Sånga kyrkogård" and I get an empty map!

showmap.jpg

And this is the PHP Notice I get:
[21-Dec-2020 11:05:37 UTC] PHP Notice:  Undefined index: place in /Applications/MAMP/htdocs/TNG13/googlemaplib.php on line 77

This does not happen in my TNG 12.3 online installation.


Thanks in advance for your kind cooperation!
Erik

Edited by XerxX
Bec Roger's link below shows map OK I excluded Google maps

Share this post


Link to post
Share on other sites
theKiwi

For me it is working OK when I use my Google map key

I do get the error if I delete my Google map key and replace it with 123 though - that is to be expected - the error in the Console would be about an invalid map key.

http://lisaandroger.com/Genealogy/showmap.php?cemeteryID=16&tree=

for example

Roger

Share this post


Link to post
Share on other sites
XerxX

Thanks Roger.

The thing is that it's exactly the same problem when I use OSM that calls osmmaplib.php wich is a customized copy of googlemaplib.php.

Do you mean that get the PHP Notice when using "123"? But not with the correct key?

I'm trying to find out why "place" is an invalid index in $val['place']

/Erik

Share this post


Link to post
Share on other sites
theKiwi

Erik - sorry - no, it all works for me as expected without a PHP notice.

And when I replaced my map key with 123, I got the "goops something went wrong" error message in the map box, but still no PHP error.

I'm still on 13.0.1 for now.

Roger

Share this post


Link to post
Share on other sites
Ken Roy

Erik,

showmap works for as expected for me with both Google Maps using the correct API key and OpenStreetMap using TNG 13.0.2

 

Share this post


Link to post
Share on other sites
XerxX

Thanks guys!

As you can see, Roger, I don't even get the "Oops!" message on that page. But it shows on getperson.php, f.ex.

:-(

/Erik

Share this post


Link to post
Share on other sites
Ken Roy

Erik,

I suspect your PHP error on the place is stopping you from getting that far in showmap, because I can cause the Oops message from Google Maps by mangling my key. 

Share this post


Link to post
Share on other sites
XerxX

Thanks Ken,

What seems to happen is that MAMP (I'm on my localhost) inserts the Notice code in the middle of the JavaScript and so I get a JS error in the console.

And "everything" breaks.

Best regards,

Erik

Share this post


Link to post
Share on other sites
XerxX

This is solved! And it turned out to be the PHP version I used!

As noted in another thread (TNG mods and PHP 8 ) i've been using PHP v7.4.2 and I have had just too many PHP Notices - from my mods as well as from TNG itself. No one (incl Darrin) understood why as they can't see them (see Ken's and Roger's replies above f.ex). And I've been struggling in vain to get rid of them.

I have now upgraded MAMP to v6 and you know what? The included PHP version is now 7.4.12 - a downgrade! (v8.0.0 is also included).

And: The pesky PHP Notices are GONE! And the map in the above situation is BACK :-D

Obviously the PHP v7.4.2 was no good.

 

Cheers!

Erik

Share this post


Link to post
Share on other sites
Ken Roy

Erik,

Before TNG 13 it is difficult to debug mods for Notice errors because there are so many generated by PHP.  TNG v13 and v13.0.2 fixes most of the PHP 7 notices.   I do not think that TNG has been widely tested with PHP 8.  There was another post that an early software adopter posted where a bunch of mods generated errors.

Share this post


Link to post
Share on other sites
XerxX

Yes Ken, the post you talk about is the one I named above: "TNG mods and PHP 8".

What I've been testing is for PHP Notices in TNG 13 and I still had sooo many.

But in that thread Michel remarked that the PHP version I used (7.4.2 - included in MAMP 5.?) was not used. And when I upgraded MAMP from v5 to v6 this morning, PHP v7.4.2 has been replaced by 7.4.12 = a downgrade!

And the Notices were gone!

/Erik

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×