Home › Toolset Professional Support › [Resolved] Toolset Maps search not showing all results searching for certain cities
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 33 replies, has 3 voices.
Last updated by Nigel 1 year, 8 months ago.
Assisted by: Nigel.
Hi Support
We have 2 Views
- Find a Job Search and Results View
- Find a Native Nanny Search and Results View
which find posts of type job-ad and nanny-ad respectively.
We have noticed that when searching using some specific cities in the search, that they are not found in the results list, however they are shown in the View Find a Job or Find a Native Nanny correctly.
For example:
Find a Job search (logged in users): hidden link
(Use test login nativenanny((( - please delete this info once noted! Thanks!)
- Shows the Ad "Test foreing address –Cologne" (post type Job Ad, post id 25381)
- However, if I search for "Cologne" in a radius of 50 km, it is not returned in the results.
- Even accepting Google Maps suggestion of "Cologne, Germany" does not find it.
- The single Job Ad shows in the map correctly in the centre of Cologne (in German: Köln). hidden link
- It is also shown correctly in My Job Ads when viewing it in Edit mode (hidden link)
And:
Find a Native Nanny search (logged in users): hidden link
(Use test login nativefamily6 *** please delete this info once noted! Thanks!)
- Shows the Ad "Nanny Ad foreing address – Cologne" (post type Nanny Ad, post id 25374)
- However, if I search for "Cologne" in a radius of 50 km, it is not returned in the results.
- Even accepting Google Maps suggestion of "Cologne, Germany" does not find it.
- The single Nanny Ad shows in the map correctly in the centre of Cologne (in German: Köln) (hidden link)
- It is also shown correctly in My Nanny Ads when viewing it in Edit mode (hidden link)
We thought perhaps it might only a problem on cities which have multiple names in different languages, for example:
English: Cologne, German: Köln
English: Nuremberg, German: Nürnberg
English: Berlin, German: Berlin, Portuguese: Berlim
because we came across the issue when users in production using computers in different languages saved ads, that they were not visible sometimes.
The same is true for our search for guest users:
Find a Job guest search (non logged in users): hidden link and
Find a Native Nanny guest search (non logged in users): hidden link and
Kind regards
Simon
Hello,
Those two user information are noted and delete from your thread, please backup your website, then update here, I need to deactivate plugins/theme in your website.
Hi Luo
If you prefer, I can make you a Duplicator package which you can run on your machine, or you can debug on our website. If you need FTP access, please give me a private reply and I can give you access details.
Kind regards
Simon
You can provide the duplicator package, share the link only, private message box enabled.
Thanks for the details, I am downloading the files, will update here if find anything
It should be a cache problem, please try these:
1) Dashboard-> Toolset-> Settings-> Maps, in section "Cached data", click button "Load stored data", find and remove item "Cologne, Deutschland"
2) Edit the problem post you mentioned above: Nanny Ad foreing address - Cologne
hidden link
in field "MY APPROXIMATE LOCATION IN GERMANY", clear/reset the value, save the post
And test again, it works fine with your duplicator package in my localhost
Hi Luo
- I cleared the map cache entry "Cologne, Germany"
- I edited both the Job Ad and the Nanny Ad with the Cologne address, entering just "Cologne" and saving the ads
- The ads are still not findable when searching specifically for "Cologne"
Even if removing the cache entry were to solve the problem temporarily (which it didn't), in my opinion this would not solve the issue permanently, if the cached entries don't work.
Kind regards
Simon
Hi Luo
Any updates on the Toolset cache problem?
Thanks and regards
Simon
The problem post you mentioned above is a post of post type "Nanny Ad":
hidden link
But the post view you are using:
hidden link
It is querying posts of another post type "Job Ads"
So it won't display that post in the view's result
I have tried these in your website:
1) Create another post view, query "Nanny Ad" posts, filter by the address field:
hidden link
2) Test it in frontend:
hidden link
search by location "Cologne, Germany", you can see the results here:
hidden link
It works fine.
Hi Luo
I think perhaps you are mistaken. To simplify the ticket, I have
- deleted all existing Job Ads and Nanny Ads
- created two new Nanny Ads, one created in English "NAD EN Cologne" and one created in German "NAD DE Köln"
- created two new Job Ads, one created in English "JAD EN Cologne" and one created in German "JAD DE Köln"
For Nanny Ads:
- As a logged in family user, (nativefamily6 login), under Find a Native Nanny (hidden link) I see both Nanny Ads at first, but if I enter "Cologne" and hit Search, I only see the "NAD EN Cologne" ad. The "NAD DE Köln" does not appear.
- If I enter "Köln" and hit Search, I still only see the "NAD EN Cologne" ad. The "NAD DE Köln" does not appear.
- As a guest user, under Find a Native Nanny (hidden link) the effect is the same.
Similarly for Job Ads:
- As a logged in nanny user, (nativenanny2 login), under Find a Job (hidden link) I see both Job Ads at first, but if I enter "Cologne" and hit Search, I only see the "JAD EN Cologne" ad. The "JAD DE Köln" does not appear.
- If I enter "Köln" and hit Search, I still only see the "JAD EN Cologne" ad. The "JAD DE Köln" does not appear.
- As a guest user, under Find a Job (hidden link) the effect is the same.
We tried several times removing the cache entry and re-searching, but it is not working reliably and consistently, as you can see for yourself. It seems that the Toolset Map Cache is a bit buggy...
Kind regards
Simon
HI Luo
Have you any updates here about the Toolset Map Cache? I sent you an update on 24 Feb and we would love to have this solved as it affects our business if the ads cannot be found by the users in their searches.
Kind regards
Simon
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi Simon
Minesh has been discussing this with me, and I was just going to check your site but it is not accessible because of fatal errors from the woo-gutenberg-products-block plugin, perhaps you could use FTP to rename the plugin folder, which will deactivate it and allow access to your site again.
In any case, based on what Minesh was sharing with me on a call earlier, I would like to clarify something about your intentions before we propose any solutions.
It seems that when you create an ad, you create 4 versions.
- A German post with German text
- A German post with English text
- An English post with English text
- An English post with German text
(By "German post" I mean that the language assigned to the post with WPML is German, regardless of what the actual text is.)
I don't understand the rationale behind this, so it's not clear to me what you expect to happen.
I would imagine that you would have two versions of a post (German post with German text, English post with English text), and that on the front end on the German page if you searched for an ad you would get the German result, and on the English search page if you searched for an ad you would get the English result.
Because you have 4 versions of the same post I don't understand what your intention is.
HI Nigel
I have resolved that error, sorry about that. WC Blocks plugin update caused it. I have temporarily renamed it.
There are only ever maximum 2 versions of each ad. Personally from a database point of view, I don't like that we are forced to create a language duplicate post just because we need translations, but I was informed way back 2-3 years ago when we started developing with Toolset/WPML/WordPress that that was how WPML worked, by creating language duplicate posts. Why WPML can't just read translations from a translation table on a database and display those to users of various languages seems strange to me, since it seems very inefficient storing and copying all the post contents and media for each language, but that's a whole other issue! 🙂
So what should happen (and what IS happening at the moment):
Nanny Ads
- When we create a Nanny Ad (CPT nanny-ad) in English, a German WPML duplicate post is created on Toolset form submission.
- When we create a Nanny Ad (CPT nanny-ad) in German, an English WPML duplicate post is created on Toolset form submission.
Job Ads
- When we create a Job Ad (CPT job-ad) in English, a German WPML duplicate post is created on Toolset form submission.
- When we create a Job Ad (CPT job-ad) in German, an English WPML duplicate post is created on Toolset form submission.
In the context of this ticket, for just, say, Nanny Ads:
- A user creates a Nanny Ad in English with location = "Cologne, Germany".
- My first expectation would be that coordinates of "Cologne, Germany" are stored for that field.
- My second expectation would be those coordinates be replicated to the German WPML language duplicate post which is created.
- My third expectation would be that it should not matter if a user searches for "Cologne, Germany" (English) or "Köln, Deutschland" (German), "Colonia, Alemania" (Spanish) or whatever other language a user's computer is set to, the results should still return the location of Cologne in Germany, since I would presume that Toolset Maps is searching based on coordinates and not name strings. In other words, the location search should not be dependent on what language the user is searching in.
Our customers are international people from different countries, and their computers (and therefore probably their browsers) are set in different languages, so if someone is searching from Brazil before coming to Germany, they might enter "Colónia, Alemanha" to search, but the Ads created originally with "Cologne, Germany" should not be excluded from search results.
A second point:
I believe that Toolset IS working well with locations and IS storing the locations as coordinates, (but I can't confirm this - you would know better), since it appears to work in MOST cases for us. However I believe the source of the issue could be with the Toolset Map cache.
A third point to reduce confusion:
Only CPT Nanny Ads are to be shown in search "Find a Native Nanny" and only CPT Job Ads are to be shown in "Find a Job", which is currently the case. I realise the Ads look very similar, but they are not the same, and there are not FOUR versions of each post, rather only TWO, one original language post and one WPML language duplicate post.
Sorry for the long winded-explanation, but I hope it provides clarity.
If you need any further info, please don't hesitate to reach out.
Kind regards
Simon
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
OK, it was confusing because it looks like there are 4 versions of the same ad, but it appears it is two ads, made in different languages, each with a duplicate.
Neither the original post first created in German nor its English duplicate are showing in the search results, even though they appear to have the correct field values.
The way Maps handles the distance search I can't debug it on your server, I need to do that locally, so I'm taking a copy of the site to do that.
I'll update you later today when I've completed that.