Skip Navigation

[Resolved] Map disappears when filter is selected

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user has a map inside an archive template that gets removed whenever a filter is changed.

Solution:
The Map Block was set within the Search Block of the archive template. And the archive template was configured to display filter options that produce results. When a filter is changed, the whole Search section gets updated and the Map within it is removed.

The Map needs to be put outside of the Search bloc, or the Loop block. Check the screenshots here https://toolset.com/forums/topic/map-disappears-when-filter-is-selected/#post-2162775

This support ticket is created 3 years, 9 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
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: Africa/Casablanca (GMT+01:00)

This topic contains 5 replies, has 2 voices.

Last updated by reeceY 3 years, 9 months ago.

Assisted by: Jamal.

Author
Posts
#2160099

Hello,

When selecting any filter the map hides:
hidden link

How can we have it instead stay visible? We don't need it to auto filter the results because people need to press submit.

Thank You

#2160623

Hello and thank you for contacting Toolset support.

Select the view block, and in its settings on the right sidebar, search for the search section, and disable AJAX when any filter changes. Make it trigger the AJAX call only when the user clicks on submit.

I hope this helps. Let me know if you have any questions.

#2160637

Hello,

Thank you for the quick reply. That is the current setting actually. If I enabled it Ajax just spins and spins. So the map is broken on folter change even with that setting disabled.

Thank you

#2160673

Thank you for your feedback. If it is not caused by that settings, I mostly suspect a compatibility issue. Please check if this issue appears when:
- Only Toolset plugins are activated. It will tell us if there is an interaction issue with another plugin.
- The theme is set to a WordPress default like Twenty-Twenty. It will tell us if there is an interaction issue with your theme.
If the problem disappears, start activating one at a time to track where the incompatibility is produced.

If that does not help find the cause of the issue, I'll need to check it closely, preferably on a minimal setup. Can you prepare a staging site? Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

#2162775

Thank you for the credentials. I thought that the issue happens because the map block is within the seach block. Check this screenshot hidden link
Once a search is performed the whole section gets overwritten. We need to move the map outside of the search block, but still within the root archive block.

I moved the map block to the up like this hidden link then I cleared the Kinsta cache, and it seems to fix the issue. Can you check and confirm hidden link

#2163587

My issue is resolved now. Thank you!