We have a site where we have records of people and the Title is fist name last name (John Smith). But we want to add the ability to sort by last name. I created an IsVersionOf field and put just the last name in the field. Since we didn’t want this field to display I marked the field as private.
In the browse.phtml file I then added the label/value pair to the field sort menu.
However, when I sort by that field, it does the exact opposite of any other field. So Ascending is Z-A and Descending is A-Z.
If I mark the field as public, then it works just fine. Ascending is A-Z and Descending is Z-A. So the issue is that it is marked as private. But I have no idea as to why it is inverting the sorts.