Skip Navigation

[Escalated to 2nd Tier] Toolset Maps Location search losing search context and defaulting back to null

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 6 replies, has 2 voices.

Last updated by Nigel 1 year, 1 month ago.

Assisted by: Nigel.

Author
Posts
#2648751
Screenshot 2023-09-29 at 16.10.59.png
Screenshot 2023-09-29 at 16.10.36.png

Hi Support

On our search pages, users can search by location:

Development Environment:
hidden link (guest users)
hidden link (logged in users)
hidden link (guest users)
hidden link (logged in users)

Production Environment:
hidden link (guest users)
hidden link (logged in users)
hidden link (guest users)
hidden link (logged in users)

If I simply enter eg "Munich" and hit the Enter key, "Munich, Germany" (in English) or "München, Deutschland" (in German) is selected automatically from the Google Maps AutoComplete suggestions, (the first one in the list, this is a nice, useful intuitive feature). The search executes briefly, but then flashes back to the default state, as if the user has not searched anything.

If I repeat, by entering eg "Munich" again, and choose the entry "Munich, Germany" from the Google Maps AutoComplete suggestions list with the mouse, "Munich, Germany" is placed in the search field. When I click the Search button, the same behaviour is exhibited: The search executes briefly, but then flashes back to the default state, as if the user has not searched anything.

If I choose any other search option, the search is auto-executed correctly and the search criteria is preserved, as desired, eg by clicking any of the checkboxes for the taxonomies. Adding a Location search executes briefly again then flashes back to a blank value for Location.

Has something changed in the Toolset Maps plugin that has reintroduced this bug? We have seen this behaviour before, then it worked normally for a while, but it was reported again to us recently by end users.

This bug is very unintuitive and frustrating for end users, and Location is probably our most important search criterion for our end users!

The bug is also present in our Production environment and can be verified in both environments using the following logins:

Kind regards
Simon

#2649163

Nigel
Supporter

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

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

Hi Simon

I wasn't able to see the problem you describe.

I tested both the development server and the production server as a guest user, which both appeared to work normally, and so I logged in to the production server and re-tested, and that also appeared to work normally.

You can see that latter test in this loom video: hidden link

Did I misunderstand the problem?

Perhaps there was a temporary problem that has resolved itself?

#2649261

HI Nigel

I can still reproduce it - see the video shared via WeTransfer:

hidden link

Kind regards
Simon

#2649277

Nigel
Supporter

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

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

OK, I see that the issue specifically arises when choosing the suggestion from Google with the keyboard, and not with the mouse and then clicking to perform the search. I've confirmed that behaviour across different browsers.

But I am unable to reproduce that on my own test site.

On my own test site it makes no difference whether I select the suggestion with the mouse and then perform the search, or whether I select the suggestion with the keyboard.

I know your site is quite heavily customised.

Could I ask that you check on the development server in a minimal install, with no custom code (JavaScript or PHP) active, non-Toolset plugins deactivated, and with a default theme like twentytwentyone.

Does the same behaviour still occur?

#2649749
Screenshot 2023-10-03 at 13.45.53.png

Hi Nigel

In order for the page to work at least, I left the 5 Toolset plugins and Elementor and Elementor Pro active, deactivated all the custom code snippets and switched to 2023 theme and can still reproduce the erroneous behaviour.

I noted as well that the URL contains the parameters "&toolset_maps_distance_radius=50&toolset_maps_distance_unit=km" but is missing the search term Munich, which is added if you select it with the mouse from the Google Maps autocomplete suggestions:

Typing "Munich" and hitting Enter key:

hidden link

Typing "Munich" and selecting "Munich, Germany" with the mouse, then hitting the Search button:

hidden link

Kind regards
Simon

#2650013

Nigel
Supporter

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

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

Thanks, I'm working on the dev site to look into it now.

#2650049

Nigel
Supporter

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

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

Screenshot 2023-10-04 at 09.50.55.png

OK, I identified what prompts the issue, and can reproduce it.

It occurs where you have split the View, so that you have the search form on one part of the page and the search results on another.

It triggers two requests for the results instead of one, one of which contains the full expected search parameters, but the second of which—that determines the results displayed on the screen—is missing the location being searched.

This occurs when your View has the search setting shown in the screenshot.

As a workaround you can change that to "AJAX results update when visitors click on the search button".

I have escalated this to the developers. If it is a simple issue then we might get a solution soon, but otherwise I would caution that it as something of an edge case it might not be a high priority.

I'll let you know when I have some feedback from development.