Skip Navigation

[Escalated to 2nd Tier] Distance calc and maps not shown anymore

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 9 replies, has 3 voices.

Last updated by nicolaS-3 1 year, 7 months ago.

Assisted by: Nigel.

Author
Posts
#2583007

Hi,
All of a sudden this morning all my browsers (Chrome, Brave, Bing, Firefox and Chrome mobile) can't detect the user position and are unable to calculate distances, even though the position check in the browser is set on "Ask".
None of the browsers triggers the ask popup.
I have created a test page that displays a map. After showing this page once in Chrome all other views (showing no map) were able to calculate distances, but this doesn't happen in other browsers or Chrome mobile. They simply don't show the map and never trigger the ask popup.
I am in troubles because my site relies quite a lot on maps and distance calculation.
Did you make any change or update in Toolset Maps ?
thanks
Regards
Nicola

#2583119

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

Can you share your debug info, please?

hidden link

#2583181

Here they are thanks

#2583429

Hello,

I have tried it in a fresh WP installation + the latest version of Toolset plugins, it works fine.

See below sandbox website:
Login URL: hidden link

Post view with map + distance shortcode:
hidden link

Distance: [wpv-geolocation message_when_missing="We need your location to show this content"]
    [toolset-maps-distance-value origin_source='visitor_location' postmeta='wpcf-test-address'] KM
[/wpv-geolocation]

See the result here:
hidden link

I can see the correct distance value after confirm the popup

Please update Toolset plugins of your website to the latest version, and test again.
You can download them here:
https://toolset.com/account/downloads/

Click link "Download Toolset manually"

#2583483

Hi Luo Yang
All my plugins are updated to the latest version because I have most auto-updates on. This morning I tried again to run the test page showing the map on all browsers: In Chrome was still working, in Edge it wasn't so I refreshed the pages, logged in and out, etc and all of a sudden the popup appeared. Enabling the position check everything worked as usual. In Firefox no way to get the popup.
On the mobile ok: I got the popup and all page showed the distance calculation.
Could it be a caching conflict ?
As you might remember last year I raised a similar issue because the popup never showed up, then it started working, now the issue seems back (in the meantime I have changed the provider and the caching plugin).
I am about to go live with my site but now I am worried that new visitors could have issues with this and leave the site because they think is crap.
Don't know what to do ....
thanks
Regards
Nicola

#2586463

Do you remember which of your ticket:
last year I raised a similar issue because the popup never showed up

Can you point out the ticket link?
I need to check it in our internal forum.

#2586793

Hello,
you might remember this
https://toolset.com/forums/topic/maps-dont-update-after-moving-admin-location/

My feeling is that Toolset Maps doesn't perform always the same way. Sometimes the "Ask" popup appears, sometimes it doesn't. Also I noticed that distance calculation appear if first I show any page with a map, after one map is shown the distance calculations appear also on other pages with no map.
Hope this helps.
Regards
Nicola

#2587979

Thanks for the details, I can see the problem in desktop Firefox browser, testing on other browsers, will escalate this issue soon

#2592961

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Nicola

I have been reviewing and testing this before escalating to the developers (which I've now done).

I recreated a clean online test site, you can see the test page here: hidden link

We each tested with a variety of browsers and found that the "Use my location" button worked in all, except FF on Windows only.

On Chrome and Edge, permission is requested as soon as you load the page. In Firefox and Safari it is only requested when you click the "Use my location" button.

In each case clicking the "Use my location" button populated the relevant input with geo-coordinates of the user.

If they then press Submit the filter works as expected, only results within the specified distance are returned.

The problem occurs when trying to output the distance of the found posts from the user location.

This is done with the toolset-maps-distance-value shortcode, and when inserting this shortcode it specifies that it is necessary to wrap the shortcode inside the wpv-geolocation shortcode.

The loop output of the View on that test site looks like this:

<wpv-loop>
          [wpv-map-marker map_id='map-1' marker_id='marker-[wpv-post-id]' marker_field='wpcf-location'][/wpv-map-marker]
          <h3>[wpv-post-link]</h3>
          [wpv-geolocation][toolset-maps-distance-value origin_source='visitor_location' postmeta='wpcf-location' unit='mi'][/wpv-geolocation]

		</wpv-loop>

Only in Chrome and Edge does this work, and display the calculated distance. In FF and Safari it continues to display "Your location is needed to show this content" where the distance is expected.

That's what I've escalated to the developers.

This is a problematic area, as browsers prioritise privacy and security. The settings for these may vary between users, and different users may also load privacy-related extensions that can impact this.

#2593759

Hello Nigel,
thanks for the update. As far as my experience is concerned, described above, I'd suggest the developers to check the code that triggers the "ask" popup. If that one appear as per the browser settings, then distance calculations and maps work too.
Thanks
regards
Nicola