Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Strange behavior on ordering collection

Started by Thierry 9 years ago · 2 replies · 653 views
9 years ago

Hello,

I get an annoying problem. I set a field (price with float type [1.16]) in header.
In php code i make :
$collection->order('header.price',"asc");

All prices are not sort in "asc" direction. I got 2.44 before 1.497 😦
(it's seems to work well with desc...)

PHP command gettype give double for header.price type. Good for sorting, but does not work.

Any idea to workaround this strange behavior ?

Thanks for help,

Regards.

Thierry

Suggested topics

Topic Participants Replies Views Activity
Support · by Paul Hodges, 4 weeks ago
19 483 5 days ago
Support · by Lauw, 7 days ago
2 99 6 days ago
Support · by Anna, 2 weeks ago
4 426 1 week ago
Support · by gtx, 4 weeks ago
4 377 3 weeks ago
Support · by Anna, 1 month ago
9 483 3 weeks ago