Skip Navigation

[Resolved] Sort Order is not set correctly after using reset button with Ajax update

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

This topic contains 7 replies, has 3 voices.

Last updated by Waqar 5 years, 1 month ago.

Assisted by: Waqar.

Author
Posts
#1339137

I have a view with a reset button that uses Ajax to update the results. The view sorts correctly when the page is reloaded instead of using Ajax. When I have the results loaded with Ajax the sort order is ignored after reset. The search button works fine the first time. If I remove the search criteria and hit search again, the order is wrong.

#1339409

Hi Cody,

Thank you for contacting us and I'd be happy to assist.

There are two controls available to sort the order of posts in a view:

1. Static/fixed "Ordering" field, available on the view's edit screen.
( screenshot: hidden link )

2. The front-end soring controls, which can be changed by the visitor.
( ref: https://toolset.com/documentation/user-guides/allowing-visitors-to-sort-the-front-end-results/ )

Whether the view is set to update results through AJAX or full page reload, using the reset button will set the order back to the fixed ordering setting, defined in the view (option 1). This means that if the visitor had selected any custom order through the front-end controls (option 2), that would be reset too.

In case, you're experiencing something different than this, I'll need to see how the view is set up in the admin area and you're welcome to share temporary admin login details.

Note: Your next reply will be private and though no changes will be made on your website, please make a complete backup copy, before sharing the access details.

regards,
Waqar

#1340101

https://toolset.com/errata/orderby-settings-not-respected-in-a-view-that-uses-ajax-to-update-its-results/

According to your documentation this is a known open issue. Can you confirm is it has been resolved in a future version?

#1340729

Hi Cody,

Thanks for writing back.

If the symptoms mentioned in that errata entry, match with your view too, then yes this can be the same issue.

I've checked and I'm afraid, we don't have a time estimate to share at the moment, but I'll keep you updated with the progress through this ticket.

Appreciate your report.

regards,
Waqar.

#1374613

Has this issue been resolved in a new version yet?

#1375357

Nigel
Supporter

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

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

Hi Cody

Waqar is off this week.

I checked the internal tickets and don't see any progress on this issue. I pinged the developers for an update, and when I get a reply I'll share it with you.

#1435827

Hi Cody,

I'd like to update that a fix for this issue has been proposed for the next releases.

For now, you can use the patch shared in this erratum page:
https://toolset.com/errata/orderby-settings-not-respected-in-a-view-that-uses-ajax-to-update-its-results/

I hope this helps and please let me know how it goes.

regards,
Waqar

#1448179

Hi Cody,

The latest release of Toolset Views (3.0.2), includes a fix for this issue.

You're welcome to update and let us know in case the issue still persists.

regards,
Waqar