Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Strange behavior on ordering collection

Started by Thierry 9 years ago · 2 replies · 686 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 blu3prince, 4 days ago
1 85 18 hours ago
Support · by complanar, 1 week ago
6 167 2 days ago
Support · by Rick Beebe, 1 week ago
2 124 4 days ago
Support · by alex, 6 days ago
2 108 5 days ago
Support · by Marcel, 2 weeks ago
1 158 5 days ago