sfu-dhil / wphp

Women's Print History Project database front end.
https://womensprinthistoryproject.com/
GNU General Public License v2.0
1 stars 8 forks source link

Person search sorting broken #184

Closed joeytakeda closed 3 years ago

joeytakeda commented 3 years ago

Describe the bug When any option other than the blank option is selected for a person search, the page breaks:

Date
2020-09-30T17:32:45-07:00
URL
https://womensprinthistoryproject.com/person/search?person_search%5Bname%5D=Martha&person_search%5Border%5D=lastname_desc&person_search%5Bid%5D=&person_search%5Bdob%5D=&person_search%5Bdod%5D=&person_search%5Bbirthplace%5D=&person_search%5Bdeathplace%5D=&person_search%5BviafUrl%5D=&person_search%5BwikipediaUrl%5D=&person_search%5BimageUrl%5D=&person_search%5Btitle_filter%5D%5Bid%5D=&person_search%5Btitle_filter%5D%5Btitle%5D=&person_search%5Btitle_filter%5D%5Bpubdate%5D=&person_search%5Btitle_filter%5D%5Blocation%5D=&person_search%5Bfirm_filter%5D%5Bfirm_id%5D=&person_search%5Bfirm_filter%5D%5Bfirm_name%5D=&person_search%5Bfirm_filter%5D%5Bfirm_address%5D=&person_search%5B_token%5D=fSb_pfBvcY73K2vZVx3apC2Rl4Lx_KyCtdu_GX1r11M
Class
500 - Doctrine\ORM\Query\QueryException
Message
[Syntax Error] line 0, col 152: Error: Expected known function, got 'date'

This happens both when a sort option is selected before an initial search or after a search has happened.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://womensprinthistoryproject.com/person/search
    1. Search for Martha
    2. Select Results sorted by "Last Name (A-Z)"
    3. Press search

OR

  1. Go to https://womensprinthistoryproject.com/person/search
    1. Search for Martha
    2. Press search
    3. Then try and sort results by Last Name (A-Z)