Open ladenree76000 opened 1 year ago
I can confirm the issue with glpi 10.0.9 and plugin 3.0.4
can confirm the problem
[2023-10-12 08:40:44] glpiphplog.WARNING: *** PHP User Warning (512): Invalid relations declared for "glpi_ticketcategories" table. Table does not correspond to a known itemtype. in /home/users/glpi/www/src/DbUtils.php at line 2064 Backtrace : src/DbUtils.php:2064 trigger_error() inc/db.function.php:585 DbUtils->getDbRelations() src/CommonDBTM.php:866 getDbRelations() src/CommonDBTM.php:788 CommonDBTM->cleanRelationData() src/CommonDBTM.php:2068 CommonDBTM->deleteFromDB() src/RuleMatchedLog.php:183 CommonDBTM->delete() src/Inventory/Asset/MainAsset.php:865 RuleMatchedLog->cleanOlddata() src/RuleImportAsset.php:969 Glpi\Inventory\Asset\MainAsset->rulepassed() src/Rule.php:1533 RuleImportAsset->executeActions() src/RuleCollection.php:1640 Rule->process() src/Inventory/Asset/MainAsset.php:574 RuleCollection->processAllRules() src/Inventory/Inventory.php:722 Glpi\Inventory\Asset\MainAsset->handle() src/Inventory/Inventory.php:353 Glpi\Inventory\Inventory->handleItem() src/Inventory/Request.php:360 Glpi\Inventory\Inventory->doInventory() src/Inventory/Request.php:90 Glpi\Inventory\Request->inventory() src/Agent/Communication/AbstractRequest.php:332 Glpi\Inventory\Request->handleAction() src/Agent/Communication/AbstractRequest.php:269 Glpi\Agent\Communication\AbstractRequest->handleXMLRequest() front/inventory.php:94 Glpi\Agent\Communication\AbstractRequest->handleRequest() ...tplace/glpiinventory/front/communication.php:72 include_once() marketplace/glpiinventory/index.php:45 include_once() public/index.php:82 require()
GLPI 10.0.10
@tsmr has already corrected the case on the master branch, but this is not included in version 3.0.4.
You just need to comment this line to get rid of the warning:
https://github.com/InfotelGLPI/resources/commit/9c68b5d04a8a2dac340bc60ea2f7ae7b19610939
Version of the plugin : 3.0.8
Version of your GLPI : 10.0.8 + glpi-agent 1.4 it happens on 2 configs : GLPI10.0.8 (ubuntu 22.04 PHP8.1 Mariadb10.6) Glpi 10.0.7 / IIS (w2012r2) / Php 8.1.7 / MariaDB 10.5.4
Steps to reproduce (which actions have you made) : install plugin . wait for some glpi-agent to update computer (it looks like if inventory triggers the error message) look php error log
Expected result : plugin should not return error message
Actual result : [2023-07-06 11:15:59] glpiphplog.WARNING: *** PHP User Warning (512): Invalid relations declared for "glpi_ticketcategories" table. Table does not correspond to a known itemtype. in /var/www/glpi/src/DbUtils.php at line 2032 Backtrace : src/DbUtils.php:2032 trigger_error() inc/db.function.php:585 DbUtils->getDbRelations() src/CommonDBTM.php:866 getDbRelations() src/CommonDBTM.php:788 CommonDBTM->cleanRelationData() src/CommonDBTM.php:2064 CommonDBTM->deleteFromDB() src/CommonDBTM.php:4610 CommonDBTM->delete() src/Inventory/Asset/MainAsset.php:783 CommonDBTM->deleteByCriteria() src/RuleImportAsset.php:969 Glpi\Inventory\Asset\MainAsset->rulepassed() src/Rule.php:1525 RuleImportAsset->executeActions() src/RuleCollection.php:1625 Rule->process() src/Inventory/Asset/MainAsset.php:575 RuleCollection->processAllRules() src/Inventory/Inventory.php:710 Glpi\Inventory\Asset\MainAsset->handle() src/Inventory/Inventory.php:341 Glpi\Inventory\Inventory->handleItem() src/Inventory/Request.php:360 Glpi\Inventory\Inventory->doInventory() src/Inventory/Request.php:90 Glpi\Inventory\Request->inventory() src/Agent/Communication/AbstractRequest.php:359 Glpi\Inventory\Request->handleAction() src/Agent/Communication/AbstractRequest.php:271 Glpi\Agent\Communication\AbstractRequest->handleJSONRequest() front/inventory.php:92 Glpi\Agent\Communication\AbstractRequest->handleRequest() public/index.php:73 require()
URL of the page : this happens silently
Screenshot of the problem (if pertinent) : more infos on glpi's forum https://forum.glpi-project.org/viewtopic.php?id=287368
it stops when plugin is deactivated