I have a list of names that need to populate a dropdown, and I’ve noticed that even though I have orderby=“last_name|first_name” sort=“asc” on my channel entries tag, the entries are only ordered by last name but not first name. This causes issues with the listing where “Jeffrey Adams” will show up before “Bob Adams”. I know I can probably just replace the channel entries tag with a straight SQL query, but then that won’t be cached and it’ll cost me more loading time. I believe this is a bug.
Here’s my full channel entries tag:
{exp:channel:entries channel="physician_database" dynamic="no" orderby="last_name|first_name" sort="asc" limit="999"}
<option value="{site_url}search/physician_profile/{url_title}">{first_name} {if middle_initial}{middle_initial}.{/if} {last_name}{if degree}, {degree}{/if}</option>
{/exp:channel:entries}