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 · 685 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, 3 days ago
1 65 41 minutes ago
Support · by complanar, 6 days ago
6 156 1 day ago
Support · by Rick Beebe, 7 days ago
2 114 3 days ago
Support · by alex, 5 days ago
2 100 4 days ago
Support · by Marcel, 2 weeks ago
1 151 4 days ago