Skip Navigation

[Resolved] Column sorting not working

This thread is resolved. Here is a description of the problem and solution.

Problem:

In a view im using "Order by > as a distance from > URL Parameter > toolset_maps_distance_center" which works great and updates the results/map based on the map search criteria

However when I use additional "Sorting Controls" to further allow the user to control the order( sort by price, size etc) these dont seem to have any effect.

Solution:

The option orderby address distance from URL parameter "toolset_maps_distance_center" option, so if there is an URL parameter "toolset_maps_distance_center" passed to view, it will override other column sorting settings, and conducts the problem.

Relevant Documentation:

This support ticket is created 3 years, 7 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/Hong_Kong (GMT+08:00)

This topic contains 15 replies, has 2 voices.

Last updated by jasonG-7 3 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#1780549
download (1).png
download.png

I am trying to do column sorting which is not working here hidden link for any column but not getting the reason why it is happening?

#1780897

Hello,

I have tried the URL you mentioned above, but can only see a htaccess login window.

And the problem you mentioned above is abnormal, please try these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/

2) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2020, deactivate all custom PHP/JS code snippets, and test again

3) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

4) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, also point out the problem page URL and view URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1780991

The file you provided is not valid, I get 404 error, please try as I mentioned above:
please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only

Private message box enabled again

#1783583

Thanks for the details, I am downloading the files, will update here if find anything

#1783813

I can install your database dump file in my localhost with a fresh WP installation + the latest version of Toolset + WPML plugins, it works fine, see my screenshot order-by-title.JPG

Then I have checked it in your website, you are using old version of WP installation 5.4.2, the latest version is 5.5.1:
https://wordpress.org/download/

Can you upgrade to 5.5.1, and test again?

#1784675

I have updated the wp version but no change. you can on our site.

#1784865

Hi Luo,

How can I see your screenshot screenshot order-by-title.JPG? I don't see an attachment on your reply.

Could you possibly log into our site and check it out? Maybe you will spot the issue easily. We are past our deadline and straining to solve this problem.

Thanks Luo!

#1784977

I'm sorry we just realized the sites health check was wrong because it's on a managed system and we didn't update to latest core. We are making a backup and will update shortly and let you know how it goes...

#1785011
order-by-title.JPG

I have upload my screenshot again, please check it

#1786385

Hi Luo,

After I load this page:

hidden link

And click on any sort label, then we see the following URL with repeating query string fields:

hidden link

What causes this? Is this normal or does this have something to do with the sorting not working?

Thanks Luo!

#1786999

Those URL parameters are expected results, they are custom search form fields of your post view "Quick Meeting Search":
Day, Language, Meeting Focus, City, etc

#1787421
Screenshot at Sep 23 06-41-55-1.png
Screenshot at Sep 23 06-41-55.png

Hi Luo,

On the URL I pasted before this form is removing the duplicate queries when I click submit.

When the page loads it loads this URL which has repeating query fields - distance_center is twice, distance_radius is twice, distance_unit is twice:

Here's a screen grab: hidden link

<em><u>hidden link</u></em>
#1787687

Hi Luo,

We found another thread that seems to mirror our issue: https://toolset.com/forums/topic/order-by-as-a-distance-from-url-parameter-sorting-controls/

Seems default sorting by distance will break all the other column sorts.

Is this the case?

Thanks!!

#1788681

Thanks for the details, I am checking it with our developers, will update here if there is any news.

#1790289

Yes, you are right, in the post view "Search Meeting By Zip", you are using orderby address distance from URL parameter "toolset_maps_distance_center" option, so if there is an URL parameter "toolset_maps_distance_center" passed to view, it will override other column sorting settings, and conducts the problem.

You can submit a feature request for it:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
Our developers will evaluate it.

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