During an update of our website with Umbraco, we upgraded from 4.7.2 to 4.11.8.
In a CSHTML-File I had this code:
foreach(var item in Model.AncestorOrSelf("Master")
.Items.First()
.PublicationFolder.First()
.Children.Where("Visible")
.OrderBy("publicationType, date desc"))
It worked fine and sorted the collection first by publicationType and then by the newest date.
In the new version (4.11.8) it doesn't work anymore. It gives me an exception: At least one object must implement IComparable.
And if I write .OrderBy("publicationType", "date desc")
, it doesn't affect the collection.
So is this a bug or am I doing anything wrong? Is there a workaround?