Skip Navigation

[Resolved] Views: Pagination not Reloading Map, click 'Next' and displays Africa

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

Last updated by Adrian Robbins 1 year, 6 months ago.

Assisted by: Waqar.

Author
Posts
#2607471

We have created a View using Kadence Tabs to display three CPT's on separate tabs in one view.

The Map on Accommodation works fine for the first Hotel. However, if you click NEXT, to display the second hotel, the map does not work and displays Africa. Then you click PREVIOUS, and the map that was working OK now also shows Africa.

We are using Pagination enabled with manual transition and AJAX because we do NOT want the page top reload on clicking either of the buttons, because this returns to the Golf Course Tab.

We have added pagination and set it to display 1 post, the idea being that you click the buttons to view the various hotels.

You can view the problem here: hidden link

The first hotel is Panmure and the second hotel is Fairmont St Andrews

Before we added the pagination (manually), we had the two hotels shown in a list and the map correctly showed two markers.

How can we resolve this, so as each hotel (and will be the same for attractions) the map loads correctly.

#2607521

Nigel
Supporter

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

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

Hi Adrian

I just checked something similar, but simpler, on my local test site, and paginating the View results one at a time also updated the marker on the map, which updated with each pagination (via ajax).

I suspect putting the View and map inside tabs might be the issue.

Can you make a test where you don't add the View and map within tabs and just include them directly on the page.

Does it work okay in that case?

If that's the problem then we can look at how to get it working within the context of tabs.

#2607561

Hi Nigel

I have quickly built a new content template, without tabs.

The URL is the same - hidden link

Unfortunately, the map is still not refreshing when you click the Next and Previous Buttons.

Look forward to hearing back from you.

Kind regards
Ade

#2607771

Hi Ade,

Thanks for writing back and sharing this update.

To troubleshoot this further, we'll need to see how this view is set up in the admin area.

Can you please share temporary admin login details, in reply to this message? We'll also need your permission to download a clone/snapshot of your website, in case this needs to be tested on a different server.

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

regards,
Waqar

#2608149

Any news on this?

All we want to do is refresh/reload the map with the new address coordinates from page 2 of the View block after the Ajax page transition

#2608241

Thank you for sharing the access details.

I've checked the view and map blocks and they seem to be configured correctly. It looks like a conflict with a third-party plugin or theme.

Do I have your permission to download a clone/snapshot of the website to test this on a different server?

#2608251

Hi Waquar

Thank you for checking and no problem to download a clone/snapshot and test on a different server.

I look forward to hearing the outcome of the test.

Kind regards
Ade

#2608955

Hi Waqar/Nigel

Is there any news on this? It's now been over 72 working hours since we reached out for advice.

All we want to do is refresh the map with the new address coordinates after an Ajax page change. From what we can see, we just need some Javascript code to put in the callback function on the pagination section. But everything we have tried doesn't refresh the map and we get Africa on the second Hotel.

Kind regards
Ade

#2608959

Thank you for the permission and I've downloaded the website's clone.

I'm currently running some tests on this clone and will share the findings, as soon as this testing completes.

Thank you for your patience.

#2608961

Hi Waqar

Many thanks for the update, which is much appreciated.

Hopefully, it's a simple one for you to resolve with the Pagination callback function javascript code.

Look forward to hearing back from you.

Kind regards
Ade

#2609625

Hi Waqar

Any news on this support request?

It's now been a week since we originally posted the problem.

This content template/view is a major part of the project and we are totally stalled until we have a resolution as to why the map is not refreshing after the Ajax pagination.

Please get back to us ASAP.

Kind regards
Ade

#2609687

Hi Ade,

I can understand that this investigation is taking a lot of time. But, this exceptional issue turned out to be way more complex than initially expected.

This is an exception because it is not reproducible on a couple of clean websites that I've tested on. Yet, it can be seen on your website and on its clone on my test server.

Here are the steps that I've followed so far, on your website's clone:

1. I've removed all non-Toolset plugins and activated the default WordPress theme (Twenty Twenty-One).

2. Re-installed WordPress core files and Toolset plugins.

3. Created new custom post types, and added their respective relationships, content templates, and the view to show the related posts with a map.

4. Checked all Toolset settings and restored them to their default values.

Despite all these steps, the issue persists on the clone. I'm still working on this and will update you as soon as I've reached to exact root cause of this behavior.

regards,
Waqar

#2610019

Hi Waqar

Thanks for the update, and it's totally bemusing that just the simple process of refreshing the map with new coordinates after the Ajax Pagination action is causing such a complex problem.

Please note this is not a finished website and we have not shown it to the client yet, so we can make whatever tweaks are necessary to get this working. We just need the ability to assign multiple hotels and visitor attractions (third tab) to a Golf Course and to be able to click through the records for hotels and attractions using buttons.

Hoping to have this resolved soon.

Kind regards
Ade

#2610093

Thank you for understanding and this matter has been escalated to the concerned team.

I'll keep you updated, as soon as I'll hear back from them.

#2610153

HI Waqar

In the first support reply from Nigel on 17 May @ 13:59, he said he had the Ajax Pagination map refresh working on one of his local sites, which was a simple site, and this confirms it does work and he, therefore, thought it might be the Kadence Pro Tabs, which was causing a conflict.

So, to try and get this problem resolved, as we are now into the 8th day, and we need to push on pronto with this important client project, I have this afternoon thrown together a totally new Toolset installation, with a Divi theme. There are NO other plugins installed other than Toolset Blocks, Types, and Maps.

I have recreated the 2 x CPT for Golf Courses and Hotels, along with many-to-many relationships. Put together a basic archive and content template, with a View Block to display the hotels and then the map outside of the View Block.

In the Pagination Callback box, I added

jQuery( document ).on( 'js_event_wpv_pagination_completed js_event_wpv_parametric_search_results_updated', function( event, data ) {
WPViews.view_addon_maps.reload_map('map-2');
});

And still, it's not working 🙁 Click on the second hotel and the map breaks.

Can you use this site to try and sort this out as it's much simpler and should have no conflicts and therefore easier to debug.

The URL is hidden link

Please send me a private link so i can let you have the Admin login details.

Kind regards
Ade