OpenStreetMap

I ran this before on my site. It all worked until my website started hanging up....

I just turned it back on (to see what would happen)

  1. map at top albums works just fine.

  2. Map on images (below), is blank. Any thoughts?

«1

Comments

  • acrylian Administrator, Developer
    edited March 2021

    First thing that comes to mind is that the image have no geo meta data.

    As on the other topic. The hanging up is releted to the image processing for sure that overloaded your server. Upload fewer images as the time to lower that.

    If you have hundreds of images with geo data the album map will create lots of markers and go through all. That can cause some delay.

    Also base rule: If you have trouble first thing to do is review the debug log. If there isn't anything review the server PHP log.

  • The images definitely have the geodata....

    when i tested this Friday, it displayed the info. same images it is blank now

    and for images with no geo data, it does not show anything at all normally (at least that is how it was working Friday :)

  • "Blank" displays are usually an indication of some sort of fatal error. So as mentioned above, check your logs.

  • OK... I will make some time tomorrow to enable and test and will get back with results

  • jwaltrip4 Member
    edited March 2021

    It is not doing it everywhere... Only certain albums.

    First error I get is:



    {2427663:Mon, 08 Mar 2021 23:45:33 GMT}
    NOTICE: Trying to access array offset on value of type bool in /var/www/cms.waltrips.com/themes/zpbase/image.php on line 52
    include called from include (index.php [130])
    from index.php [56]



    {2427663:Mon, 08 Mar 2021 23:45:33 GMT}
    NOTICE: Trying to access array offset on value of type bool in /var/www/cms.waltrips.com/themes/zpbase/image.php on line 52
    include called from include (index.php [130])
    from index.php [56]



    {2427663:Mon, 08 Mar 2021 23:45:34 GMT}
    NOTICE: Trying to access array offset on value of type null in /var/www/cms.waltrips.com/zp-core/zp-extensions/openstreetmap.php on line 772
    openStreetMap->printMap called from printOpenStreetMap (openstreetmap.php [1056])
    from include (image.php [80])
    from include (index.php [130])
    from index.php [56]



    {2427663:Mon, 08 Mar 2021 23:45:34 GMT}
    NOTICE: Trying to access array offset on value of type null in /var/www/cms.waltrips.com/zp-core/zp-extensions/openstreetmap.php on line 772
    openStreetMap->printMap called from printOpenStreetMap (openstreetmap.php [1056])
    from include (image.php [80])
    from include (index.php [130])
    from index.php [56]

  • from apache log I get:



    [Mon Mar 08 18:44:49.125090 2021] [php7:notice] [pid 2427662] [client 192.168.1.104:59772] PHP Notice: Trying to access array offset on value of type bool in /var/www/cms.waltrips.com/themes/zpbase/image.php on line 52, referer: http://cms.waltrips.com/index.php?album=Breksville-Reservation



    [Mon Mar 08 18:44:49.125191 2021] [php7:notice] [pid 2427662] [client 192.168.1.104:59772] PHP Notice: Trying to access array offset on value of type bool in /var/www/cms.waltrips.com/themes/zpbase/image.php on line 52, referer: http://cms.waltrips.com/index.php?album=Breksville-Reservation



    [Mon Mar 08 18:44:49.207715 2021] [php7:notice] [pid 2427662] [client 192.168.1.104:59772] PHP Notice: Trying to access array offset on value of type null in /var/www/cms.waltrips.com/zp-core/zp-extensions/openstreetmap.php on line 772, referer: http://cms.waltrips.com/index.php?album=Breksville-Reservation



    [Mon Mar 08 18:44:49.207879 2021] [php7:notice] [pid 2427662] [client 192.168.1.104:59772] PHP Notice: Trying to access array offset on value of type null in /var/www/cms.waltrips.com/zp-core/zp-extensions/openstreetmap.php on line 772, referer: http://cms.waltrips.com/index.php?album=Breksville-Reservation



    [Mon Mar 08 18:45:33.880223 2021] [php7:notice] [pid 2427663] [client 192.168.1.104:59792] PHP Notice: Trying to access array offset on value of type bool in /var/www/cms.waltrips.com/themes/zpbase/image.php on line 52, referer: http://cms.waltrips.com/index.php?album=Breksville-Reservation



    [Mon Mar 08 18:45:33.880334 2021] [php7:notice] [pid 2427663] [client 192.168.1.104:59792] PHP Notice: Trying to access array offset on value of type bool in /var/www/cms.waltrips.com/themes/zpbase/image.php on line 52, referer: http://cms.waltrips.com/index.php?album=Breksville-Reservation



    [Mon Mar 08 18:45:34.004687 2021] [php7:notice] [pid 2427663] [client 192.168.1.104:59792] PHP Notice: Trying to access array offset on value of type null in /var/www/cms.waltrips.com/zp-core/zp-extensions/openstreetmap.php on line 772, referer: http://cms.waltrips.com/index.php?album=Breksville-Reservation



    [Mon Mar 08 18:45:34.004826 2021] [php7:notice] [pid 2427663] [client 192.168.1.104:59792] PHP Notice: Trying to access array offset on value of type null in /var/www/cms.waltrips.com/zp-core/zp-extensions/openstreetmap.php on line 772, referer: http://cms.waltrips.com/index.php?album=Breksville-Reservation

  • I think I have found something?

    I did some analysis on the photos...

    The camera has GPS and is supposed to write it to the photo.


    Many pics have GPS info, and it looks like those display. However, some have a '0' value for latitude and longtitude... those do not display, but there is a blank square where it would go.


    When I compare to the pictures from camera without GPS, there is no blank box.

    My guess is that if openstreetmaps see GPS defined, it trys to use the data with no validation. If it is not defined, it does not try


    Bug?

  • The Apache logs have the same info as the zenphoto logs. The first two errors are a problem with zpbase and/or the multiple_layout plugin. The logs do not provide enough information to say what exactly is the problem. Best guess is that there is no album layout for the album and the theme does not correctly deal with that case.

    The openstreetmap error is likely a problem with the image geocoordinates. The line number indicated does not match up with any possible array indexing in the released version of openstreetmap, so are you running current releases? have you made any modifications?

    What is line 772 in openstreatmap.php?

  • I backed I out of any changed i made... this is straight up zpbase. Just dowbloaded lated zpbase from git. ZP is 1.57

    The blank block on the images in the album is for photos that should have gps info but do not (maybe GPS was inaccessible).

    Oldee photos with no gps info at all dont have this issue.

    I will test more comparing old photo exif with tje new photos.

    I will also find out what is on the line you asked about.

    My suspiscion is that the openstreetmap needa a little more checking. It deternines that the pic has gps data but cannot deal when the data is bad

  • acrylian Administrator, Developer
    edited March 2021

    We will look at hte two lines. A constant problem with EXIF etc data was in the past that not all cameras follow the same "standard" as this is not a "fixed" standard for some reason. Perhaps we might require one of the images to reproduce the issue.

    zpBase is not actively maintained or extened, we just look to fix bugs if they surface.

    Btw, you should also always try the master from GitHub (not on a production site) to see if issue meanwhile have been fixed. Surely not in this case but in general.

  • acrylian Administrator, Developer

    Please try zpBase from the repo as the image.php issue should be fixed. Probably the multiple_layouts plugin should be changed so it returns a consistent type like an proper empty array instead of false if there is no layout.

  • acrylian Administrator, Developer

    Also try OSM from Github if the fix I added helps.

  • do you mean zp_openstreetmap

  • zpbase did not flix the blank openstretmap issue

  • acrylian Administrator, Developer

    do you mean zp_openstreetmap

    There is no zp_openstreetmap. The plugin is named openstreepmap.php.

    zpbase did not flix the blank openstretmap issue

    I didn't fix anything for zpBase regarding OSM as there is nothing to fix with the theme. I did (hopefully) fix the layout notice you posted above.

  • line 772 on openstreetmap.php is the second line of this:

    var map = L.map('osm_map<?php echo $this->mapnumber; ?>', {
    center: [<?php echo $this->center[0]; ?>, <?php echo $this->center[1]; ?>],
    zoom: <?php echo $this->zoom; ?>, //option
    zoomControl: false, // disable so we can position it below
    minZoom: <?php echo $this->minzoom; ?>,
    <?php if (!empty($this->maxzoom)) { ?>
    maxZoom: <?php echo $this->maxzoom; ?>
    <?php } ?>

  • acrylian Administrator, Developer

    Yes, again try the version from Github.

    • Do I need to download the ZP_OpenStreetmap? is that what you means by OSM? (there is a bunch of stuff under "OSM" by that name"


      Looking at the exif data, on the pictures. I the ones that display withthe blank panel below the image are missing there GPS info. the ones with GPS info display just fine. My fguess is that we were walking in gullys and ravines and there was no cell or GPS connection.


      However the theme or OpenStreetMap is determining that there should be GPS data is where I think the issue probably is. It is deciding that there should be GPS data, and then barfs when the data is no good (null, etc).


      My albums with Nikon D60 on same gallery work just fine. No GPS data in the pictures, and no openstreemap stiff shows up at all
  • acrylian Administrator, Developer
    edited March 2021

    Do I need to download the ZP_OpenStreetmap? is that what you means by OSM? (there is a bunch of stuff under "OSM" by that name"

    A plugin like this consists of a file and optionally a folder of the same name. That Is the plugin.
    https://www.zenphoto.org/news/using-plugins-and-third-party-features/

    The fixed plugin does determine if there is gps data and it also checks if the center property is empty.

    Unless you can tell what values trigger the issue here I cannot really help.

    The theme has nothing to do with this.

  • jwaltrip4 Member
    edited March 2021

    You stated:

    Also try OSM from Github if the fix I added helps.

    What is OSM from github? Did you mean ZP_OpenStreetmap in github? the only OSM I see is OSM Labs

  • acrylian Administrator, Developer
    edited March 2021

    Did you mean ZP_OpenStreetmap in github?

    No, as you can read there it is abandoned becuase it is incorporated in Zenphoto.

    I am referring to the master build (also known as support build) of Zenphoto from GitHub. Linked from the download page and also mentioned on the installation page: https://www.zenphoto.org/news/installation-and-upgrading/

    Here:
    https://github.com/zenphoto/zenphoto

  • jwaltrip4 Member
    edited March 2021

    Ahhh...

    1.5.8? (vs 1.5.7 I installed)
    I installed 1.5.7 from Git

  • fretzl Administrator, Developer

    You need to download and install the Support build

  • acrylian Administrator, Developer

    It is not 1.5.8 yet, it 's 1.5.8RC currently (Release candidate). Please take the time and read the links we post.

  • Just tested again. Image with good GPS info returned no errors in apache error log or debug log.

    Image with bad GPS info returns this: (debug)

    {1406444:Tue, 09 Mar 2021 16:28:44 GMT}
    NOTICE: Trying to access array offset on value of type null in /var/www/cms.waltrips.com/zp-core/zp-extensions/openstreetmap.php on line 772
    openStreetMap->printMap called from printOpenStreetMap >>.>(openstreetmap.php [1056])
    from include (image.php [85])
    from include (index.php [130])
    from index.php [56]
    {1406444:Tue, 09 Mar 2021 16:28:44 GMT}

    NOTICE: Trying to access array offset on value of type null in /var/www/cms.waltrips.com/zp-core/zp-extensions/openstreetmap.php on line 772
    openStreetMap->printMap called from printOpenStreetMap (openstreetmap.php [1056])
    from include (image.php [85])
    from include (index.php [130])

    (apache)

    [Tue Mar 09 11:28:44.118590 2021] [php7:notice] [pid 1406444] [client 192.168.1.104:54173] PHP Notice: Trying to access array offset on value of type null in /var/www/cms.waltrips.com/zp-core/zp-extensions/openstreetmap.php on line 772, referer: http://cms.waltrips.com/index.php?album=Hocking-Hills/10-26-20 Old Man's Cave & Rock House&amp;image=20201026_124914.jpg

    [Tue Mar 09 11:28:44.118775 2021] [php7:notice] [pid 1406444] [client 192.168.1.104:54173] PHP Notice: Trying to access array offset on value of type null in /var/www/cms.waltrips.com/zp-core/zp-extensions/openstreetmap.php on line 772, referer: http://cms.waltrips.com/index.php?album=Hocking-Hills/10-26-20 Old Man's Cave & Rock House&amp;image=20201026_124914.jpg

    Looking at the code, and I think you already said, something bad is being passed. the error does not point to what that is directly

    I will DL 1.5.7 and 1.5.8 and try them from git (Install is currently from GIT

  • acrylian Administrator, Developer

    You really need to try the 1.5.8RC version of the plugin where I think I have fixed this. Since I don't an image at hand to reproduce the issue so you need to confirm it is or not.

  • thanks. Where can I find 1.5.8RC?
    I have look on git and here and cannot find :(

  • acrylian Administrator, Developer
    edited March 2021

    Fretzl provided a direct link above and it is linkeed on our download page. Otherwise the green button on https://github.com/zenphoto/zenphoto

  • Ah... It does not say 1.58, so I assumed it was 1.57.
    Got it.


    CMS Working.... But now openstreetmap does not display at all good or bad

  • acrylian Administrator, Developer

    Ah... It does not say 1.58, so I assumed it was 1.57.

    No, because it is always the work in progress next version, in this case it will become 1.5.8 later on

    CMS Working.... But now openstreetmap does not display at all good or bad

    Review your logs.

Sign In or Register to comment.