Saltar navegación

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

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

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 -

Zona horaria del colaborador: America/Sao_Paulo (GMT-03:00)

Este tema contiene 4 respuestas, tiene 3 mensajes.

Última actualización por Mateus Getulio 1 year, 9 months ago.

Asistido por: Mateus Getulio.

Autor
Mensajes
#2738571

I am facing very odd issue its of numbers Please check blow video
enlace oculto

enlace oculto

#2738658

Nigel
Colaborador

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+01: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

enlace oculto

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

Los hilos nuevos creados por Mateus Getulio y vinculados a este se encuentran a continuación:

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

#2738707

Mateus Getulio
Colaborador

Idiomas: Inglés (English )

Zona horaria: 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