fusioninventory / fusioninventory-for-glpi

FusionInventory plugin for GLPI
http://www.FusionInventory.org/
GNU Affero General Public License v3.0
361 stars 148 forks source link

Version: 9.1.1.1: glpi_plugin_fusioninventory_deployorders removed but still used #2035

Open lufik opened 7 years ago

lufik commented 7 years ago

Hi,

I just upgraded to: GLPI: 9.1.2 FusionInventory: 9.1.1.1

Now I see in my files/_log/sql-errors.log several log entries: 2017-01-23 15:31:18 [2@glpi] *** MySQL query error: SQL: DELETE FROM glpi_plugin_fusioninventory_deployorders WHERE plugin_fusioninventory_deploypackages_id=33 Error: Table 'glpi.glpi_plugin_fusioninventory_deployorders' doesn't exist Backtrace : ...fusioninventory/inc/deploypackage.class.php:389 inc/commondbtm.class.php:494 PluginFusioninventoryDeployPackage->cleanDBonPurge() inc/commondbtm.class.php:1366 CommonDBTM->deleteFromDB() inc/massiveaction.class.php:1079 CommonDBTM->delete() inc/massiveaction.class.php:994 MassiveAction::processMassiveActionsForOneItemtype() inc/massiveaction.class.php:973 MassiveAction->processForSeveralItemtypes() front/massiveaction.php:64 MassiveAction->process()

I took look in the source code and I see the table name in: install/update.php (in Drop tables not used part)

but it is still used in other php files: plugins/fusioninventory/inc/deployfile.class.php: $cnt = countElementsInTable('glpi_plugin_fusioninventory_deployorders', plugins/fusioninventory/inc/deployfile.class.php: $cnt = countElementsInTable('glpi_plugin_fusioninventory_deployorders', plugins/fusioninventory/inc/deploypackage.class.php: $query = "DELETE FROM glpi_plugin_fusioninventory_deployorders

IMHO this is a bug. I don't know the priority (if it hurts or not). I see the same also in git HEAD.

tabad commented 7 years ago

Hello,

I have the same error.

The environment is the following,

and this is the content of sql-errors.txt file.

# cat ./sql-errors.txt
2017-02-01 10:27:35 [7@inventariopre.sescam.jclm.es]
  *** MySQL query error:
  SQL: DELETE FROM `glpi_plugin_fusioninventory_deployorders`
                WHERE `plugin_fusioninventory_deploypackages_id`=31
  Error: Table 'inventario.glpi_plugin_fusioninventory_deployorders' doesn't exist
  Backtrace :
  ...fusioninventory/inc/deploypackage.class.php:389
  inc/commondbtm.class.php:494                       PluginFusioninventoryDeployPackage->cleanDBonPurge()
  inc/commondbtm.class.php:1366                      CommonDBTM->deleteFromDB()
  inc/massiveaction.class.php:1079                   CommonDBTM->delete()
  inc/massiveaction.class.php:994                    MassiveAction::processMassiveActionsForOneItemtype()
  inc/massiveaction.class.php:973                    MassiveAction->processForSeveralItemtypes()
  front/massiveaction.php:64                         MassiveAction->process()
2017-02-01 10:27:35 [7@inventariopre.sescam.jclm.es]
  *** MySQL query error:
  SQL: DELETE FROM `glpi_plugin_fusioninventory_deployorders`
                WHERE `plugin_fusioninventory_deploypackages_id`=73
  Error: Table 'inventario.glpi_plugin_fusioninventory_deployorders' doesn't exist
  Backtrace :
  ...fusioninventory/inc/deploypackage.class.php:389
  inc/commondbtm.class.php:494                       PluginFusioninventoryDeployPackage->cleanDBonPurge()
  inc/commondbtm.class.php:1366                      CommonDBTM->deleteFromDB()
  inc/massiveaction.class.php:1079                   CommonDBTM->delete()
  inc/massiveaction.class.php:994                    MassiveAction::processMassiveActionsForOneItemtype()
  inc/massiveaction.class.php:973                    MassiveAction->processForSeveralItemtypes()
  front/massiveaction.php:64                         MassiveAction->process()