Bug #5106

Sql error with suppliers

Added by blerohellec about 5 years ago. Updated about 5 years ago.

Status:NewStart date:10/17/2014
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Configuration : GLPI 0.84.7, and plugin domains v1.6.0
In Management > Suppliers, view a supplier (not all, but some of them) generates a Sql error.

slq-errors.log (extract)
  • MySQL query error: ***
    SQL: SELECT COUNT AS cpt
                 FROM `glpi_plugin_domains_domains` WHERE `glpi_suppliers`=\'2\'
                                                    AND entities_id NOT IN (\'0\')
    Error: Unknown column 'glpi_suppliers' in 'where clause'
    Backtrace :
    /var/www/glpiOLD/inc/db.function.php :328        DBmysql->query()
    /var/www/glpiOLD/inc/commondbtm.class.php :1697        countElementsInTable()
    /var/www/glpiOLD/inc/commondbtm.class.php :2098        CommonDBTM->canUnrecurs()
    /var/www/glpiOLD/inc/supplier.class.php :114        CommonDBTM->showFormHeader()
    /var/www/glpiOLD/front/supplier.form.php :90        Supplier->showForm()
    /var/www/glpiOLD/front/supplier.form.php

Indeed, column glpi_suppliers does not exist in table glpi_plugin_domains_domains. But column suppliers_id is present.

History

#1 Updated by blerohellec about 5 years ago

The error seems to come from /plugins/domains/hook.php
function plugin_domains_getdatabaserelations
the array references column glpi_suppliers in table glpi_plugin_domains_domains where it should be column suppliers_id.

Also available in: Atom PDF