pluginsGLPI / treeview

Treeview GLPI plugin
GNU General Public License v2.0
5 stars 7 forks source link

fix: tree not displayed #49

Closed Rom1-B closed 1 year ago

Rom1-B commented 1 year ago

The tree is not displayed, generating an error in SQL logs:

glpisqllog.ERROR: DBmysql::query() in /home/ubuntu/Dev/GLPI/10.0-bugfixes/src/DBmysql.php line 379
  *** MySQL query error:
  SQL: SELECT * FROM `glpi_locations` WHERE `level` = '1' AND `locations_id` = '0' AND () ORDER BY `completename` ASC
  Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY `completename` ASC' at line 1
  Backtrace :
  src/DBmysqlIterator.php:112                        
  src/DBmysql.php:1078                               DBmysqlIterator->execute()
  plugins/treeview/inc/config.class.php:356          DBmysql->request()
  plugins/treeview/inc/config.class.php:276          PluginTreeviewConfig->getNodesFromDb()
  plugins/treeview/left.php:58                       PluginTreeviewConfig->buildTreeview()

This is not systematic; I was able to reproduce it only once on 1st use.