I’ve recently noticed that the advanced items search form on my site no longer works if you search on more than one field. Specifically, if you search for two things, like Date = 2011 AND Title contains ‘asia’, the query that’s actually run is Date contains ‘asia’. Was there a recent change to the search form logic? I do have a slightly modified search form template in my theme (here: archaeobib/items/search-form.php at master · sashafr/archaeobib · GitHub), but that has been working fine for the last several years until recently (altho its only recently been reported to me, it might have been an issue for a couple months and my clients just passed it along, they don’t check in on this site super often).
Here is a specific example:
URL of the search results page:
The actual query if I turn on debug.profileDB:
SELECT items
.* FROM om_items
AS items
LEFT JOIN om_element_texts
AS _advanced_0
ON _advanced_0.record_id = items.id AND _advanced_0.record_type = ‘Item’ AND _advanced_0.element_id = 50 WHERE (_advanced_0.text LIKE ‘%2011%’) GROUP BY items
.id
ORDER BY items
.added
DESC, items
.id
DESC LIMIT 30
Any advice on where to look next would be great!