markers sometimes not showing on open street map
This topic contains 8 replies, has 4 voices, and was last updated by neil purves 5 years ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
November 8, 2019 at 9:53 am #516409
Hi
I am using geo directory on a cloudways server with open street map and using the Listimia theme.
My issue is with the markers sometimes not showing on the map. This seems to happen when i am viewing the site and not logged on, when i am signed into the site everything seems to be working perfectly.
The returned data from the database after searching is correct as all the posts i would expect back from the searchs are listed in the order i would expect and they are all there. It is just they are not on the map if the user is not logged in and the map has the messqage “No Records Found
Sorry, no records were found. Please adjust your search criteria and try again.”When checking on inspect element, in the call to the database the REQUEST HEADERS are the same except for the cookie sent (see below).
However the RESPONSE HEADERS are different (see below) with the content-type: application/json; charset=UTF-8 (shows markers on map) when the user is logged in and content-type: text/html; charset=utf-8 when the user isn’t logged in (not showing in map). So to me it looks as if the open street map is unable to convert the text html response to jsonLooking at the call to the database made by my webpage you find:-
url used – exactly the same
HEADERS
general – exactly the same
request headers – exactly the same , except for the cookie sent one says wordpress_logged_in the other says wordpress_test_cookie
response headers – very different (see below) with the content type of :-working – application/json; charset=UTF-8
not working – content-type: text/html; charset=utf-8——————————————-
REQUEST HEADERS:authority: same
:method: same
:path: same
:scheme: same
accept: same
accept-encoding: same
accept-language: same
cache-control: no-cache
pragma: same
referer: same
sec-fetch-mode: same
sec-fetch-site: same
user-agent:same
x-requested-with:same(working)
cookie: _ga=GA1.2.1560921275.1573118468; _gid=GA1.2.928778067.1573118468; _gat=1; PHPSESSID=r01o66sr93g4bfg8j6kpif7mcl; _gd_logged_out_post_author=624bf7bf54; wordpress_logged_in_bc0e3afee2bcbe94c0cfe1519e839a3b=neilpurves%7C1573291287%7C1OgfzWXtOPOl2NgsUuCH8lcEgAWfwjN3K3HNmU449GP%7Cb1f6643f33c328846021b5a6a810cd744efc3c1dd4784b5a66c83b8ed6076579(not working)
cookie: _ga=GA1.2.1994985008.1572516896; _gid=GA1.2.1933043247.1572950170; PHPSESSID=l32rmbf5s9tt10n5mn4k7dc7o1; _gd_logged_out_post_author=546ee44faf; wordpress_test_cookie=WP+Cookie+check; _gat=1——————————————–
RESPONSE HEADERS – NOT WORKING – user not logged in
accept-ranges: same
age: same
cache-control: max-age=2592000
cache-provider: CLOUDWAYS-CACHE-DE
content-encoding: gzip
content-length: 502
content-type: text/html; charset=utf-8
date: Thu, 07 Nov 2019 09:13:48 GMT
expires: Sat, 07 Dec 2019 09:13:48 GMT
last-modified: Thu, 07 Nov 2019 07:24:35 GMT
server: nginx
status: 200
vary: Accept-Encoding
x-cache: MISS
x-robots-tag: noindex, nofollowRESPONSE HEADERS – WORKING – user logged in
accept-ranges: bytes
access-control-allow-headers: Authorization, Content-Type
access-control-expose-headers: X-WP-Total, X-WP-TotalPages
age: 0
allow: GET
cache-control: no-cache, must-revalidate, max-age=0
cache-provider: CLOUDWAYS-CACHE-DC
content-encoding: gzip
content-length: 502
content-type: application/json; charset=UTF-8
date: Thu, 07 Nov 2019 09:21:37 GMT
expires: Wed, 11 Jan 1984 05:00:00 GMT
last-modified: Thu, 07 Nov 2019 09:21:37 GMT
link: <**** ACTUAL LINK TO DATABASE HIDDEN BY ME***/>; rel=”https://api.w.org/”
pragma: no-cache
server: nginx
status: 200
vary: Origin,Accept-Encoding
x-cache: MISS
x-content-type-options: nosniff
x-robots-tag: noindex
x-robots-tag: noindex, nofollowNovember 8, 2019 at 10:56 am #516414Hello,
Are you using a cache plugin?
You can try disabling Varnish on CW to see if that is related.If we need to check the settings please share WP Admin credentials in a private reply.
Thanks
November 8, 2019 at 11:10 am #516419This reply has been marked as private.November 8, 2019 at 12:12 pm #516428This reply has been marked as private.November 12, 2019 at 12:04 pm #516742This reply has been marked as private.November 14, 2019 at 8:40 am #517102Hi neil,
It looks like content type issue here in response headers. For logged in users the content-type in response headers is “application/json; charset=UTF-8” but non logged users the content-type in response headers is “text/html; charset=utf-8”.
Content type should be “application/json; charset=UTF-8”. Provide us a FTP credentials to look into more.
Regards,
KiranNovember 14, 2019 at 9:34 am #517112This reply has been marked as private.November 14, 2019 at 1:08 pm #517126This reply has been marked as private.November 14, 2019 at 1:22 pm #517129This reply has been marked as private. -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket