Sauter la navigation

[Résolu] Distance selection was working, now not working

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

Toolset Maps 1.8 and 1.8.1 require MySQL 5.7.6 and above to provide distance filtering and sorting capabilities to Views.

Solution:

This is fixed in Toolset Maps plugin version 1.8.2

Relevant Documentation:

This support ticket is created Il y a 5 années et 5 mois. There's a good chance that you are reading advice that it now obsolete.

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Ce sujet contient 11 réponses, a 3 voix.

Dernière mise à jour par DavidW2160 Il y a 5 années et 5 mois.

Assisté par: Luo Yang.

Auteur
Publications
#1282301
Rothy.png

I am trying to: Use the Views + Maps distance filter

Link to a page where the issue can be seen:
lien caché
lien caché

I expected to see: the same listing(s) on both pages

Instead, I got: the no-filter page shows the listing(s), the filter page does not. The only difference between the two pages is a distance filter from my address in Cottage Grove, OR 97424, and the listing(s) are also in the same city/zip

This seems to have occurred abruptly with the download of the most recent maps plugin (update) and after conversion of the cache.

The filter set within the view also seems to generate a cached address in San Francisco, no matter what address I tell it in the view distance filter. See uploaded image. This should have been 725 E Whiteaker Ave, Cottage Grove OR 97424

#1282499

Hello,

Thanks for the details, I can see the problem in your website, the distance filter does not work as expected.
I am trying to duplicate the same problem in my localhost, will update here if there is anything found.

#1282595

I can get the same result with MariaDB in my locahost, and below error message:

WordPress database error: [FUNCTION wordpress.ST_Distance_Sphere does not exist]

The function ST_Distance_Sphere() was added in MYSQL 5.7.6:
lien caché

but you are using MySQL 5.5.5, so it conducts the problem.

According to our document:
https://toolset.com/toolset-requirements/
The minimal requirement is: MySQL 5.6 and above.

So it should be a bug of Toolset Maps plugin, I have escalated this issue, will update here if there is any news.

#1282763

Here is the feedback from our developers:
We are working on it. Currently, please try these:
1) Backup your website
2) Downgrade to Maps 1.7.4, no data should be lost and things should continue working as before
You can download it here:
https://toolset.com/download/toolset-maps/#changelog

#1283485

I can't vouch for the accuracy of this post, but there's a potential replacement function for MariaDB users like us:

https://stackoverflow.com/questions/44409012/function-st-distance-sphere-does-not-exist-in-mariadb

CREATE FUNCTION `st_distance_sphere`(`pt1` POINT, `pt2` POINT) RETURNS
decimal(10,2)
BEGIN
return 6371000 * 2 * ASIN(SQRT(
POWER(SIN((ST_Y(pt2) - ST_Y(pt1)) * pi()/180 / 2),
2) + COS(ST_Y(pt1) * pi()/180 ) * COS(ST_Y(pt2) *
pi()/180) * POWER(SIN((ST_X(pt2) - ST_X(pt1)) *
pi()/180 / 2), 2) ));
END

#1283795

Thanks for the link, I have shared it with our developers.

And we have add a new errata for this issue:
https://toolset.com/errata/maps-1-8-and-1-8-1-require-mysql-5-7-6-or-higher/

#1286501

I can confirm that I'm having this same issue on lien caché

Location filters worked when I initially developed the site, but after updating the Toolset Maps plugin, I found that they no longer function as they once did.

Update: I can also confirm that the previous version of the Toolset Maps plugin allows the distance filter to operate. I just dialed it back now. Will wait for the next release before updating again.

#1287165

Hello,

Here is the feedback from our developers:
This is fixed in Toolset Maps plugin version 1.8.2, it is under QA status, will be released soon.

And According to our document:
https://toolset.com/toolset-requirements/
The minimal requirement is: MySQL 5.6 and above.

So you will need to upgrade the MySQL server to 5.6 or above.

#1287853

I have just confirmed that version update 1.8.2 fixes my problem. Give them my thanks!

#1288333

Thanks for the confirmation.

#1288829

1.8.2 fixed this issue for me. Thank you!

#1288833

My issue is resolved now. Thank you!