I'm having a run on sorting problems, this one is unrelated to previous posts!
This page is a grouped asset listing. The group is based on metadata, and is working fine. The sorting of the assets themselves is also based on metadata - the Author field - and it's not quite working as I'd hoped.
Because the Author field can contain html (to allow for some author names to be bold), using the 'sort by metadata field value' option brings all the results where the first name is in bold to the top of the sort. It's (correctly, I supposed) sorting: "<strong>Zorro..." ahead of "Adam". Fair enough.
This only shows up as a problem in the 2103 group. The fact that the other two groups appear to sort correctly is simply a coincidence.
Anyway, undeterred, I created a new "Sorting by Asset Keyword Value" option using the keyword: %asset_metadata_Author^striphtml%, but when I attempt to sort by that value, my assets are all over the place. I can't even work out how they're being sorted it's so random.
I know the keyword returns a usable value because I've added %asset_metadata_Author^striphtml^maxchars:4% as a title attribute for each list item, and that's returning the expected values (hover over the items to view).
Why can't I use this keyword as a sort key? Any other options?
I should add that we are using an ancient version 4.0.3 - soon to be upgraded. Maybe it's an issue that's already been "sorted" ;-)