Skip Navigation

[Closed] Order checkboxes by count

This support ticket is created 4 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 – 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 9 replies, has 2 voices.

Last updated by Shane 4 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#1577039

Hi,
I have a view with this filter :

[wpv-control-post-taxonomy taxonomy="mot-cle" type="checkboxes" format="%%NAME%% (%%COUNT%%)" orderby="count" order="DESC" url_param="wpv-mot-cle"]

But results are NOT ordered by count as I expected they should.
Would this be a bug ?
Please check hidden link
Thank you.

#1577817

Shane
Supporter

Languages: English (English )

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

Screenshot 2020-04-07 at 4.20.17 PM.png
Screenshot 2020-04-07 at 4.19.47 PM.png

Hi Roman,

Thank you for getting in touch.

I logged in to the site to check on the issue for your because on my end the items sort as intended when I ran a quick test. See Screenshot

However when I checked your site I noticed that your Archive is resulting in a Page not found error. See Screenshot

Could you check on this for me so that I can have a look at the filters on the frontend. Currently nothing stands our to me that would point to an issue but I would need to check the filters on the frontend .

Also is this a test site where I can manipulate such as disable plugins swap themes etc?

Please let me know and we can go from there.

Thanks,
Shane

#1577869

Hello,
It was due to a permalink issue ; the bug is now solved thanks to Christian so you can access hidden link again.
Thank you.

#1578683

Shane
Supporter

Languages: English (English )

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

Hi Roman,

Is this a test site where I can disable the plugins and re-enable them or even swap theme ?

Your site is already minimal as it is but I would just like to rule out any possibilities of a conflict.

Also should it be needed I would want to grab a copy of the site as well.

Thanks,
Shane

#1578689

Yes thank you. This is a test site and you may do anything you think may help !
You also are welcome to grad a copy.
Thank you very much.

#1578873

Shane
Supporter

Languages: English (English )

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

Hi Roman,

I suspect the issue is with the filter itself because I created a test here .
hidden link

As you can see on this page the filters are sorted correctly.

What happens is that the filters are being sorted by the Parent First and then the child.

So your sorting would look something like this.

-Parent 1 (1)
--Child 1(0)
--Child 2 (4)
--Child 3 (5)
-Parent 2 (3)
--Child 4(0)
--Child 5(6)

So what I would do now is to remove these filters without all the conditionals and just test with a simple archive like I did here.
hidden link

Where if it was replicable there then that would mean there is something else wrong. Given that the issue is not there then something is wrong with your archive and I would recommend stripping it down to its bare minimum.

Thanks,
Shane

#1578925

I don't understand your answer.
You say when you do it otherwise, it works...
The problem is I need the view to work as it works now.
So wherever is the bug, there still is a bug, ain't it ?
Thank you.

#1578991

Shane
Supporter

Languages: English (English )

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

Hi Roman,

I did a crosscheck of this with the order that you are experiencing and the actual order in terms of count of the items.

It is in fact being ordered correctly.

In essence the function is doing what it is meant to do. Order the terms based on their count. Now what it is NOT doing is ordering the items based on the relative page that it is on.

A proof of this can be found at the links below.
hidden link

hidden link

Checking both of the Mots-cles filters on the pages you will see that the orders are the same. Essentially the relative count for the available post is different but it doesn't change the fact that the category "AFFCHER_EN_ACCORDEON" has more posts than the "NAVIGATION" category.

What we are experiencing wouldn't be considered as a bug but an improvement that is needed. As such I would recommend that you fill out the form below and explain what is needed.
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

You can also mention this ticket and what I've said about the Relative sorting and not the global sorting.

Please let me know if this is clear or if further explanation of the findings are needed and I will be more than happy to continue assisting you.

Thanks,
Shane

#1584703

I understand that ordering a filter only work globally and not relatively to the page where the view is displayed.
But since both functionalities are meant to work together, in the same plugin, and they don't, I think this can be called a bug alright.
Even the displayed "count" number isn't related to the "global" count, so it seems illogic to me that the order doesn't follow the same comportment.
If bug is a too strong word, let's call this an oversight.
I have therefore suggested to edit this feature.
Thank you.

#1585521

Shane
Supporter

Languages: English (English )

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

Hi Roman,

Thank you for submitting the request.

Is there anything else on this particular issue that further clarification is needed?

If not then you can go ahead and mark this ticket as resolved.

Thanks,
Shane

The topic ‘[Closed] Order checkboxes by count’ is closed to new replies.