Skip Navigation

[Resolved] "Search by distance" not showing the city that is searched for

This support ticket is created 2 years, 7 months ago. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 7 replies, has 2 voices.

Last updated by brendonD 2 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#2150251

Tell us what you are trying to do?
- A search of "within 50km of Brisbane QLD, Australia" brings up 111 results. They're all accurate.
- However, there are an additional 46 results that are NOT showing up; all of which have the location of "Brisbane, Queensland".

The problem also occurs with Sydney and Adelaide, but seems to be working fine with all the other capital cities around Australia.

(Although, update, while typing this I asked my partner to try from her work computer and she has the exact opposite problem to me. For her, ONLY Brisbane results are showing up in the 'within X distance' search)

Is there any documentation that you are following?
- The tutorials when I signed up to Toolset.

Is there a similar example that we can see?
- You can check my website directly, if you need; I'll give you access (again) if you need it.

What is the link to your site?
offendersexposed.com.au/offender-search/ - Though it's behind a paywall so I'll need to give you access, manually.

#2150521

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Yes - sure, Please share admin access details and all required information with what key word I've to search and what are the problems with the result you get.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2150565

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

- Using the keyword "Brisbane" (and no other filtering) returns 46 results.
==>
I run a search using the keyword "Brisbane" and I got 111results.

- Using "within 20km of Brisbane QLD, Australia" (and no other filtering) returns 40 completely different results.
==>
Using "within 20km of Brisbane QLD, Australia" (and no other filtering) - I got 40 results. I see you set the view to order by post ID that is why you see maybe different result, you should try to set your view order by post title or something and check if you see the same results.

- Using BOTH filters simultaneously returns 1 (one) result.
==>
What you mean by both filters simultaneously, what keyword exactly you are using?

Lets fix first of all the original issue and we can split the ticket with every new question you may have.

#2150885
Search Options.PNG

There are literally only 46 posts that have the keyword "Brisbane" in the title/description/location; not 111.

Okay, starting over:
- Brisbane IS within 1km+ of Brisbane. We can both agree on this, correct?
- And there are TWO different types of search options on my website; one for 'search by distance' and one for 'search by keyword'. (See attached image)
- And, yes, there's a sorting feature; but that's completely irrelevant to the number of posts that show up in the results section.

So, when I use the 'search by distance' option:
- There are 40 results for "within 20km of Brisbane"
- There are 111 results for "within 50km of Brisbane"
- But the 46 posts that have "Brisbane" as the location do NOT show up.
- Meaning all 40/111 results are for every other suburb NEAR Brisbane EXCEPT Brisbane, itself.

= As another example, there are zero results for "within 1km of Brisbane"; despite there being 46 results that ARE Brisbane. (And, as we already agreed; Brisbane is within 1km+ of Brisbane)

And when I use the 'search by keyword' option: (The traditional 'search bar')
- 46 results for the keyword "Brisbane" as there are 46 posts that have "Brisbane" in either the title, the description and/or the location.
- Rightfully none of the surrounding suburbs show up because none of them have "Brisbane" in their title/description/location.

What I expect to see?
- The 46 entries with "Brisbane" as their location should also show up as results for any 'search by distance' results where "Brisbane" is the center of the distance radius.
ie.
- There should be 111 posts NEAR Brisbane + 46 IN Brisbane for "within 50km of Brisbane" = 157 total results
- And there should be 40 nearby suburbs + 46 Brisbane results for "within 20km of Brisbane" = 86 total results.

And, as I said, the same thing happens for Sydney and Adelaide, but the other major cities within Australia are all working as they should be. (All 64 posts with "Melbourne" as their location, for example, all still show up as results for a "within 1km of Melbourne VIC, Australia" search)

#2151113

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please share duplicator copy of your site, I will require that to debug this issue further.
=> https://toolset.com/faq/provide-supporters-copy-site/

I have set the next reply to private which means only you and I have access to it.

#2152549

How is this looking? Any chance we'll get it sorted before the weekend?

(Also, is the last message I left private? It doesn't have the 'show private message' option; it just looks like a normal, open to everyone message)

#2152865

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

It looks like you have imported few records and that was casing the issue.

I've tried to follow the following steps:
- Deactivated the Toolset Maps plugin
- Removed the table "wp_toolset_maps_address_cache" from database
- Activated the Toolset Maps plugin
- Navigate to: Toolset => Settings => Maps tab and clicked on the button "Check for missing cache entries" until all missing entries are recorded

Can you please confirm now it works as expected.

#2153127

Thank you, I can confirm the issue is resolved. And thank you for listing the steps so that if it ever happens again I can try that myself (and/or it gives me other ideas of things I can try to troubleshoot before coming to support).

There's still the matter of the location box de-selecting itself for seemingly no reason, but I'll open a new ticket for that.

Thank you again, Minesh.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.