Skip Navigation

[Resolved] AJAX Loading

This support ticket is created 4 years, 6 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by Shane 4 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#1357803

Hi,

The AJAX loading is not working as expected. I have created multiple pages to display output and the display works as expected (e.g. the new toolset view loads without page refreshing).

However when I'm trying to adjust the search filters or sorting controls the page unexpectedly refreshes.

I'm trying to use the block editor for simplicity and have that set to Pagination enabled with manual transition and AJAX. I've also gone into the classic view and set custom search setting to: AJAX results update when visitors change any filter values.

Despite this the page still refreshes when either I change the search filter or sorting controls. Can you please advise how to correct this error?

The page I'm referring to is: hidden link

Thank you,

Brett

#1358135

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Brett,

Thank you for getting in touch.

Could you send me a screenshot of your view's search setting ?

It could be that you have the settings for a live reload enabled "Full page refresh when visitors click on the search button with input values auto-updating"

If so then you need to change the setting for the view.

Thanks,
Shane

#1358139
Screen Shot 2019-10-09 at 12.10.23 am.png
Screen Shot 2019-10-09 at 12.09.30 am.png
Screen Shot 2019-10-09 at 12.09.18 am.png
Screen Shot 2019-10-09 at 12.05.57 am.png
Screen Shot 2019-10-09 at 12.05.29 am.png
Screen Shot 2019-10-08 at 11.57.05 pm.png

Hi,

Thanks for coming back. Attached are the screen shots from the archives setting page and also from the block editor. I set this view up in the block editor and this is where I first encountered the issue. I also had a look at the classic settings page however there doesn't appear to be any issues that I can see.

Thanks,

Brett

#1358225

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Brett,

So to get this correct when you set this up in the classic way to create a view you encounter no issues at all.

This only occurs when you create your view through the block editor?

Would you mind allowing me to have admin access to the site to check on the issue ?

Thanks,
Shane

#1358375

No problem Shane.

I believe you still have access from the other issue that you're working on (https://toolset.com/forums/topic/google-maps-isnt-loading-appears-to-have-a-javascript-issue/).

I sent the wordpress invite to your address the other day.

Thanks,

Brett

#1359217

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Brett,

I checked on this issue again for you.

And I see that you've set the view to only reload once they have clicked on the submit button.

Is this the desired functionality or do you want to reload the view each time the value changes?

Please let me know.

Thanks,
Shane

#1359477
Screen Shot 2019-10-10 at 5.07.37 pm.png
Screen Shot 2019-10-10 at 5.07.17 pm.png
Screen Shot 2019-10-10 at 5.06.57 pm.png

Hi Shane,

Thank you. I really don't mind to be honest. At the moment you are correct - I've set this to only update when the search button is hit. However irrespective what happens is the entire page reloads instead of just the view. Is this suppose to happen? I thought the page would remain stable and just the view would reload.

There are also two other issues with the view:

1) For the sorting section there is an issue with the refresh. The AJAX functionality is working (data updates after changing the sorting function) however the actual data that displays repeats itself and omits items. E.g. There a 4 items to be displayed - when I then changing the sorting by price it displays 4 items however 2 of those items are repeats (instead of actually displaying all 4 items sorted correctly). This seems extremely odd. This issue also presents itself when I sort by name.

Please note: when I set the option to page reload the data correctly populates. It only appears to happen when applying sorting 'without reloading the page'.

2) The format changes when the items are displayed. When I search by location (for a single data item i.e. change the search from all to say Malaysia) the format changes i.e. the width of the column is reduced unexpectedly.

Thank you for your patience and assistance. I just wasn't expecting these kinds of issues.

I've attached some screen shots to help you see what's happening:
- 1st shot (...5.06.57 pm.png) shows the repetition (the post at the bottom is the same as the top post) - same link as well, so a definite duplicate.
- 2nd and 3rd shot (...5.07.37 & ...5.07.17 pm png.) shows the unexpected width issues

Thanks,

Brett

#1359545

Hey Shane,

Just wanted to clarify one other thing. For the AJAX issue. I haven't really been using the classic editor. I have changed the option in the classic editor to AJAX however this doesn't change the problem - the whole page still reloads. Sorry for not being specific here. I hope this clarifies the point (in addition to the two other issues above).

Thanks,

Brett

#1359817

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2019-10-10 at 10.09.24 AM.png

Hi Brett,

The view should reload with AJAX. I've selected this setting in view in the copy of the site and the view refreshes fine without reloading the page. See Screenshot.

Could you try this on your end and let me know?

"1) For the sorting section there is an issue with the refresh. The AJAX functionality is working (data updates after changing the sorting function) however the actual data that displays repeats itself and omits items. E.g. There a 4 items to be displayed - when I then changing the sorting by price it displays 4 items however 2 of those items are repeats (instead of actually displaying all 4 items sorted correctly). This seems extremely odd. This issue also presents itself when I sort by name."

I'm checking on this for you. The issue seems to be that not all of the results are being refreshed. I would suggest remaking this view completely as there might be an error in when it was first made that is causing this.

"2) The format changes when the items are displayed. When I search by location (for a single data item i.e. change the search from all to say Malaysia) the format changes i.e. the width of the column is reduced unexpectedly."

This does not occur on my end. In fact the view still loads with its correct dimensions. As recommended please re-create the view.

Thanks,
Shane

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.