The Problem Looking at the biblio table structure, there is no author column in the biblio table. Authors are stored in a separate table called biblio_author (which links biblio_id to author_id) in admin/modules/bibliography/index.php.
The Problem Looking at the biblio table structure, there is no author column in the biblio table. Authors are stored in a separate table called biblio_author (which links biblio_id to author_id).
The error occurs in this section of the code (around line 730-745) admin/modules/bibliography/index.php:
} else {
require LIB . 'biblio_list.inc.php';
// table spec
$table_spec = 'biblio LEFT JOIN item ON biblio.biblio_id=item.biblio_id';
$str_criteria = 'biblio.biblio_id IS NOT NULL';
if ($can_read AND $can_write) {
$datagrid->setSQLColumn('biblio.biblio_id', 'biblio.biblio_id AS bid',
'biblio.title AS \'' . __('Title') . '\'',
'biblio.isbn_issn AS \'' . __('ISBN/ISSN') . '\'',
'IF(COUNT(item.item_id)>0, COUNT(item.item_id), \'<strong style="color: #f00;">' . __('None') . '</strong>\') AS \'' . __('Copies') . '\'',
'biblio.last_update AS \'' . __('Last Update') . '\'');
$datagrid->modifyColumnContent(2, 'callback{showTitleAuthors}');
} else {
$datagrid->setSQLColumn('biblio.biblio_id AS bid', 'biblio.title AS \'' . __('Title') . '\'',
'biblio.isbn_issn AS \'' . __('ISBN/ISSN') . '\'',
'IF(COUNT(item.item_id)>0, COUNT(item.item_id), \'<strong style="color: #f00;">' . __('None') . '</strong>\') AS \'' . __('Copies') . '\'',
'biblio.last_update AS \'' . __('Last Update') . '\'');
// modify column value
$datagrid->modifyColumnContent(1, 'callback{showTitleAuthors}');
}
$datagrid->invisible_fields = array(0);
$datagrid->setSQLorder('biblio.last_update DESC');
// set group by
$datagrid->sql_group_by = 'biblio.biblio_id,
biblio.title,
biblio.labels,
biblio.image,
biblio.author, // <-- THIS COLUMN DOES NOT EXIST!
biblio.edition,
biblio.isbn_issn,
biblio.last_update';
}
The Fix Remove biblio.author from the GROUP BY clause and also from any other references where it’s used incorrectly in admin/modules/bibliography/index.php:
} else {
require LIB . 'biblio_list.inc.php';
// table spec
$table_spec = 'biblio LEFT JOIN item ON biblio.biblio_id=item.biblio_id';
$str_criteria = 'biblio.biblio_id IS NOT NULL';
if ($can_read AND $can_write) {
$datagrid->setSQLColumn('biblio.biblio_id', 'biblio.biblio_id AS bid',
'biblio.title AS \'' . __('Title') . '\'',
'biblio.isbn_issn AS \'' . __('ISBN/ISSN') . '\'',
'IF(COUNT(item.item_id)>0, COUNT(item.item_id), \'<strong style="color: #f00;">' . __('None') . '</strong>\') AS \'' . __('Copies') . '\'',
'biblio.last_update AS \'' . __('Last Update') . '\'');
$datagrid->modifyColumnContent(2, 'callback{showTitleAuthors}');
} else {
$datagrid->setSQLColumn('biblio.biblio_id AS bid', 'biblio.title AS \'' . __('Title') . '\'',
'biblio.isbn_issn AS \'' . __('ISBN/ISSN') . '\'',
'IF(COUNT(item.item_id)>0, COUNT(item.item_id), \'<strong style="color: #f00;">' . __('None') . '</strong>\') AS \'' . __('Copies') . '\'',
'biblio.last_update AS \'' . __('Last Update') . '\'');
// modify column value
$datagrid->modifyColumnContent(1, 'callback{showTitleAuthors}');
}
$datagrid->invisible_fields = array(0);
$datagrid->setSQLorder('biblio.last_update DESC');
// set group by - REMOVED biblio.author
$datagrid->sql_group_by = 'biblio.biblio_id,
biblio.title,
biblio.labels,
biblio.image,
biblio.edition,
biblio.isbn_issn,
biblio.last_update';
}