Bug #289

Updated by Chris Cannam almost 11 years ago


The author autocomplete search function is not working in the live site.

The symptom is just that no results appear, but in the logs there is a 500 server error for the autocomplete callback. The error says

<pre>
ActiveRecord::StatementInvalid (PGError: ERROR: column "authorships.id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT * FROM "authorships" WHERE (LOWER(name_on_paper) LIKE...
^
: SELECT * FROM "authorships" WHERE (LOWER(name_on_paper) LIKE '%sandler%' OR LOWER(email) LIKE '%sandler%') GROUP BY name_on_paper, institution, email ORDER BY name_on_paper LIMIT 100):
vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb:211:in `autocomplete_for_author'
</pre>

This is presumably something where Postgres is stricter than MySQL.

Back