Skip Navigation

[Resolved] Map does not refresh with custom post filter results

This support ticket is created 6 years 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: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 3 voices.

Last updated by Waqar 6 years ago.

Assisted by: Waqar.

Author
Posts
#1168667
Captura de pantalla 2018-12-18 a las 13.31.45.jpg
Captura de pantalla 2018-12-18 a las 13.27.39.jpg

Hello,

we have set a view, that has nested another map view.

Currently two filter dropdowns correctly refresh results and map when changing a value (like this hidden link) (green image), but when searching for custom fields, like this search:

hidden link

the results would appear but the map will not reflect the results (red image).

You can see in green that

What could be happening?

Thank you very much

#1168789

Nigel
Supporter

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

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

What is the correct number of results that should be returned for that search?

23 or over 900?

I'm not sure how you have set this up (nesting the map View inside another View), so it would probably help if I could take a look at your site directly.

Let me set up a private reply to get credentials from you so that I can see.

You may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site, even though I don't intend to make any changes.

#1168857

Nigel
Supporter

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

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

The map is in a different View than the main View which includes the filter controls, and so it is not expected that the map should respond to the filters applied to a different View.

I'm not sure what your intention was setting it up like this.

Edit your main View "Annuaire-googlemapsview" and where in the Loop Output section you insert the second View...

[wpv-layout-start]
[wpv-view name="annuaire-map-googlemapsview"]
[wpv-items-found]

...delete that View and insert the map shortcode directly. Then in between the wpv-loop tags of this same View insert the marker shortcode.

The second View is not required, you want a single View to display the filter controls, the results in a list, and the same results also as markers on a map.

#1171390
Captura de pantalla 2018-12-22 a las 0.50.04.jpg

Yes, thank you Nigel,

however, I rejected that option because due to pagination, when filtering the map would only show the items in the page, and not all the items found in that search.

I mean, for instance, after filtering by "schools", toolset finds 42 results, but due to the fact that I have set a pagination of 8 items by page, the map will not show the 42 schools but only the 8 results of the first page.

That's why I created another view with no pagination and that only renders markers, with another map.

My goal was to control with one [wpv-filter-controls] both views. Is there a posibility to do this?

By doing that I will get a map with all the results, and maintain the pagination for visual convenience.

Thanks Nigel!

Best,

Mario

#1172538

Hi Mario,

Thanks for writing back.

Nigel will be away for the next few days, but I'll be happy to follow up on this ticket.

I tried to access the admin area of the website, using the information you've previously shared, but the login page doesn't seem to be accessible and is showing "not found" page.

Theoratically, what you plan to achieve should work if the two views are using exactly identical query filters and URL parameters for filters and the only difference is that the one for the map is set to show all results at once, without the pagination.

It is also important that search results are set to update with a full page refresh and not using AJAX.

You'll also have to make sure that if you're filtering the default query using a function like "wpv_filter_query", it should be getting applied to the both views as well.
( ref: https://toolset.com/forums/topic/4-input-boxes-for-same-text-search-form/#post-1168704 )

In case the issue still persists, you're welcome to share the link to the working admin area page.

I'll set your next reply as private, just in case.

regards,
Waqar