Skip Navigation

[Resolved] it is taking 100 as smallest number and 99 as large number

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

Problem:

The customer experienced an issue where a numerical field was sorting incorrectly, treating numbers as strings. After fixing this, they reported a new issue: navigation problems when users are not logged in, but everything works fine when users are logged in.

Solution:

The initial sorting issue was resolved by changing the field type to a number. The new issue with navigation for logged-out users was split into a separate ticket to maintain a focus on one issue per ticket.

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 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 4 replies, has 3 voices.

Last updated by Mateus Getulio 2 months, 2 weeks ago.

Assisted by: Mateus Getulio.

Author
Posts
#2738571

I am facing very odd issue its of numbers Please check blow video
hidden link

hidden link

#2738658

Nigel
Supporter

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

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

Hi there

It looks like you are sorting the field as a string (so 1 comes before 9, or 100 comes before 90), whereas it needs to be sorted as a number.

Checking on my own test site, it seems that the field type used for sorting is inherited from the field type itself.

So if your column is for a Number custom field it will be sorted as a number. If your column is for a Single Line custom field, it will be sorted as a string.

Are you able to change the Rating field type to a number?

#2738659

Yes I did and working thank you!

#2738687

hidden link

Please watch this video seems like issue with navigation when the user is not logged in. But if the user is login everything works perfectly fine

New threads created by Mateus Getulio and linked to this one are listed below:

https://toolset.com/forums/topic/split-issue-with-navigation-when-the-user-is-not-logged-in/

#2738707

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Thank you for confirming that the initial issue has been fixed.

I split this ticket into a new one so that we can keep one issue per ticket.

I already sent you a reply in the new ticket. You can also see the link above.

Thank you,
Mateus