Skip Navigation

[Resolved] Search results not present on the map starting from page 2

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 18 replies, has 3 voices.

Last updated by matthiasV-2 1 year, 2 months ago.

Assigned support staff: Nigel.

Author
Posts
#2227617

Refer this ticket to Waqar.

The search results from the first page are only presented on the map above, not the results from the 2nd, 3rd, ... page.

How come and how can we fix this so that the search results from each page itself are present on the map above?

hidden link

#2227643

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hello,

Waqar is on vacation for entire week, I will take care of this thread.

Please elaborate the questions with more details:
not the results from the 2nd, 3rd, ... page.

Where and how can I see the problem you mentioned above? Private message box enabled.

#2227647

Then please refer this threat to Nigel.

#2227655

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Unfortunately, Nigel is 2nd tier support, can not take this thread too, if you want more assistance for it, please provide details as I mentioned above.

#2227673

Nigel is agreed to take our support tickets in the occasion that Waqar is not available.

#2228655

Nigel
Supporter

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

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

You have a paginated View with a map and you want all results to appear as markers on the map and not just the results from the first page?

In that case you would need two Views. One to provide the paginated list of results, and a second View without pagination to provide the markers for the map (and which doesn't output anything else, it just powers the map).

#2228699

No, we want the results from each page to appear as markers on the map. We don't want a seperate map where all the results appear.

Now the markers are only correct for the first page and these markers stay the same for the second, third, ... page. The markers that should appear for the second page are the results for the 2nd page. The markers that should appear for the third page are the results for the 3rd page,...

Please provide us with clear information on how to set this up exactly.

#2228859

Nigel
Supporter

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

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

When I visit the page on the front end and look at the page markup it appears as if you have Infinite Scroll set for the pagination (as well as having the manual pagination links).

Can you ensure that the View is *not* set to paginate using Infinite Scroll (there are known issues with Maps on custom archives, it appears it may be a problem with a View and map as well).

If that doesn't help I'll need to get site credentials from you, but please check that first.

#2228997

Where do you see the pagination using infinite Scroll for this page: hidden link?

I can only see that this page is setup with a "pagination enabled with manual transition and page reload."

Am I missing something? Please provide me with screenshots or a video recording.

#2229559

Nigel
Supporter

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

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

From comments in the markup on the front end.

I don't have access to the back end. If you haven't set infinite scroll for the pagination then it is likely a red herring, let me set a private reply to get credentials to your site and I will take a look.

#2229711

Nigel
Supporter

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

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

Screenshot 2021-11-25 at 10.40.39.png

When editing the page in the back end the Map block is broken (screenshot), and there is a related JS error in the console.

That may explain why the markers do not update on the front end after paginating.

Unfortunately it is not possible to see why the block broke.

Your Toolset plugin versions are up-to-date and the JS file in question appears to be, too (it was updated in version 2.0.10 because of a similar problem).

I'm afraid you will need to delete the Map block and recreate it.

I expect that should fix the problem you initially reported, please let me know.

#2229729

We already tried to recreate the map block but that was unsuccessfull.

Maybe you can give it a try?

I know this goes beyond your level of support but at the end this is a technical issue or bug that is your responsibility to solve.

#2230149

Nigel
Supporter

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

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

I deleted and added back a Map block, but it appears to suffer from the same problem (not the error, but the problem you reported).

I can't reproduce the same problem on my own test site, where it works as expected.

So I need to take a copy of the site to install locally for further testing.

It's a big site, fingers crossed that works without any mishaps, I'll update you again...

#2230887

Nigel
Supporter

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

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

Because it is such a large site—it took hours to create a copy and more hours to install it—it is very unwieldy which makes trying to debug the problem very challenging.

So I suggest a workaround, which I have set up on your live site and which is working, which is to persist with the Map block to draw the map, but to use the legacy shortcodes to add the markers.

So you will notice on that page that the Map block settings do not any markers.

If you scroll down to the bottom of the View loop section, you will note that I have added a Fields and Text block that I used to insert a wpv-map-marker shortcode, which adds a marker for the current post in the loop.

After paginating (or doing anything else to change the displayed results) the map markers update accordingly.

If you want to customise the markers check the available attributes for the wpv-map-marker shortcode which you can edit as required: https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-marker

(Or you can delete the existing shortcode and use the Fields and Views button (with the Toolset logo) in the Fields and Text block to insert the marker shortcode again, choosing the options from the settings as you do.)

#2230903

Hi Nigel,

It looks good for hidden link.

Can we add the same shortcode for similar pages (see below) to update the markers accordingly and avoid the same issue for these pages?

hidden link
hidden link
...