Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Diego

Not Sorting Dates & Numeric Value

Hello,

I am trying to sort dates in a custom post type (event listings) and the sorting is not working. It seems the year is not being accounted for as all January dates show in sequence, but the year is not considered. For example, the list looks like this:
January 4, 2014
January 7, 2012
January 20, 2013
January 27, 2014

Also, I have a custom numeric field that will not sort. I have tried identifying it as a “Default” and “Numeric” field type, with the same results for each. Sorting in ascending or descending does not work.

Please let me know how to fix these issues.

Thanks,
Diego

9 years, 4 months ago
Stavaux

Same issue here: dates are sorted numerically/alphabetically not chronologically.

9 years, 4 months ago
Diego

Can we get a response on this?

9 years, 3 months ago
Tobias Schutter
Developer

I have not been able to reproduce this issue. Could you tell me what the exact stored value is in the custom field for “date” and “numeric”? (instead of the displayed value)

You can find this on the post/page itself in the Custom Field section.

Thank you.

9 years, 3 months ago
Diego

Hi,

The date is stored in this format: 2014-12-17 20:00:00
The numeric field is stored as a 3-digit number.

9 years, 3 months ago
Tobias Schutter
Developer

Diego, I have sent you a PM with the current beta version with a patch. Please give it a try and let me know if the patch fixed it for you.

9 years, 3 months ago
Tobias Schutter
Developer

What are you using to create the Custom Fields?

9 years, 3 months ago
Diego

I will try the patch and let you know how it works out.

9 years, 3 months ago
Tobias Schutter
Developer

Could you tell me what the setting is for the numeric types field:
“Allow multiple-instances of this field” or “This field can have only one value”

9 years, 3 months ago
Diego

“This field can have only one value”

9 years, 3 months ago
Tobias Schutter
Developer

I still can not reproduce the issue with the numeric sorting. I have made a quick screencast on how it should go: http://recordit.co/YxYZ5IZcz3.

The only thing that’s not handeld correctly is when the integer starts with a zero.

I will send you a PM.

9 years, 3 months ago
Tobias Schutter
Developer

Found the underlying issue. The label for the numeric value contained the “#” character which caused the issue. I would advise to not use the “#” character in a label for now, untill I have a fix in place.

Thank you for all the feedback!

9 years, 3 months ago
Tobias Schutter
Developer

@Stavaux Are you still experiencing a problem with sorting numeric values?

9 years, 3 months ago
Stavaux

Yes. But on my site, it concerns user’s fields so I’m not sure what are the exact values stored. I’ve got not # in labels.

9 years, 3 months ago
Tobias Schutter
Developer

Ok, and what are you using to create the Custom Fields?

9 years, 3 months ago
Stavaux

I’m using Types.

9 years, 3 months ago
Tim Gooch

4 years later, I’m seeing the same problem.

I’ve told AC Pro that the column is numeric. When I filter a given view, it understands this, and can show me, for example, all posts where the value is higher than 20.

The sort order (ASC or DESC) appears to be completely random. It’s not even alphabetical based on the ASCII value of the numbers.

And… this feature alone was the motivation behind me purchasing the pro license.

4 years, 7 months ago
Stefan van den Dungen Gronovius
Developer

Hi Tim,

Maybe another plugin also offers a sorting feature, causing our sorting feature to fail.
The problem/strenth with WordPress is that everyone can hook into the query, but this also makes it vulnerable to conflicts. You could try to install the plugin Query Monitor and analyze the query on the overview page when you sort to see if that might give some insights about what’s happening. You can send me that information at support@admincolumns.com.

Please notice that if this is the only reason you bought our plugin and we don’t get this working, we can always give you a refund.

4 years, 7 months ago

You must be logged in to reply to this topic.