Global search returning no results - this must be a simple problem?November 16, 2020 at 6:51pm (Edited 2 months ago)
I've got a site that is returning no results for the global twill search. To clarify, yes I have the correct fields defined in the twill config file and search is enabled in the 'enabled' part of the config as well as in the specific modules, ie:
'dashboard' => ['modules' => ['App\Models\Album' => ['search' => true,'search_fields' => ['title'],etc...
I'm using the debug bar to view the queries run when a search is made and can see it running a query on the one table that my specific test query will contain a match with. Copy pasting the sql query made by twill into a db tool confirms that the query definitely was returning records.
Yet they don't appear to be valid results somehow as the global search always reports "No results found.".
What could be wrong ? Is there anything obvious to check ?
November 20, 2020 at 6:23pm
Worked out what was going on, Laravel debug bar saved the day and I found an exception being raised. I have records that were entered manually in my main data object tables and they have null updated_at values. That causes this error. Going to raise a github issue about this as its really not quite robust enough.