All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Using the popular tag is throwing an error.

Jason Boothman 30 Jan 2019 14:48 problem, active

I copied the exp:low_search:popular tag from your docs and when I use it on the page an error is being thrown.

I am running the latest version of Low Search (6.1.3).

SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #2 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'pro0418-02-18.71.reusser.design.exp_low_search_log.search_date' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by:
SELECT 'keywords', COUNT(*) AS search_count FROM ('exp_low_search_log') WHERE 'site_id' = 1 AND 'keywords' != '' GROUP BY 'keywords' ORDER BY 'search_count' desc, 'search_date' desc LIMIT 10
ee/legacy/database/drivers/mysqli/mysqli_connection.php:117

Replies

  1. Low 30 Jan 2019 19:31

    Probably due to MySQL 5.7.5+, similar to what's discussed here https://craftcms.stackexchange.com/qu... (From CraftCMS SE, but same sort of issue).

    Will look at a fix from a LS pov.

  2. Low 31 Jan 2019 07:55

    For now, open up models/low_search_log_model.php and look up line #192, which reads:

    ->order_by('search_date', 'desc')


    ...and change that to...

    // ->order_by('search_date', 'desc')


    ...so commenting out that line. That should get rid of the error.