Skip to content

Invalid relations spam in log #524

@tguichard25

Description

@tguichard25

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

GLPI Version

11.0.4

Plugin version

2.12.4

Bug description

I have errors “Invalid relations declared between” spamming the logs:

  • Invalid relations declared between "glpi_plugin_order_othertypes" and "glpi_plugin_order_others" table. Target field "plugin_order_othertypes_id" is not a foreign key field of "PluginOrderOthertype".

  • Invalid relations declared between "glpi_plugin_order_deliverystates" and "glpi_plugin_order_orders_items" table. Target field "plugin_order_deliverystates_id" is not a foreign key field of "PluginOrderDeliverystate".

  • Invalid relations declared between "glpi_plugin_order_analyticnatures" and "glpi_plugin_order_orders_items" table. Target field "plugin_order_analyticnatures_id" is not a foreign key field of "PluginOrderAnalyticnature".

  • Invalid relations declared between "glpi_plugin_order_accountsections" and "glpi_plugin_order_orders" table. Target field "plugin_order_accountsections_id" is not a foreign key field of "PluginOrderAccountsection".

Almost 500,000 lines in 24 hours.

Relevant log output

glpi.WARNING:   *** User Warning: Invalid relations declared between "glpi_plugin_order_accountsections" and "glpi_plugin_order_orders" table. Target field "plugin_order_accountsections_id" is not a foreign key field of "PluginOrderAccountsection". at DbUtils.php line 2247
  Backtrace :
  ./src/DbUtils.php:2247                             
  ./src/autoload/dbutils-aliases.php:651             DbUtils->getDbRelations()
  ./src/CommonDBTM.php:921                           getDbRelations()
  ./src/CommonDBTM.php:845                           CommonDBTM->cleanRelationData()
  ./src/CommonDBTM.php:2183                          CommonDBTM->deleteFromDB()
  ./src/CommonDBConnexity.php:138                    CommonDBTM->delete()
  ./src/NetworkPort.php:522                          CommonDBConnexity->cleanDBonItemDelete()
  ./src/CommonDBTM.php:840                           NetworkPort->cleanDBonPurge()
  ./src/CommonDBTM.php:2183                          CommonDBTM->deleteFromDB()
  ...pi/Inventory/Asset/InventoryNetworkPort.php:552 CommonDBTM->delete()
  ...pi/Inventory/Asset/InventoryNetworkPort.php:136 Glpi\Inventory\Asset\NetworkPort->handleUpdates()
  ./src/Glpi/Inventory/Asset/NetworkPort.php:890     Glpi\Inventory\Asset\NetworkPort->handlePortsTrait()
  ./src/Glpi/Inventory/Asset/NetworkPort.php:638     Glpi\Inventory\Asset\NetworkPort->handlePorts()
  ./src/Glpi/Inventory/MainAsset/MainAsset.php:1067  Glpi\Inventory\Asset\NetworkPort->handle()
  ./src/Glpi/Inventory/MainAsset/MainAsset.php:967   Glpi\Inventory\MainAsset\MainAsset->handleAssets()
  ...pi/Inventory/MainAsset/NetworkEquipment.php:243 Glpi\Inventory\MainAsset\MainAsset->rulepassed()
  ./src/RuleImportAsset.php:993                      Glpi\Inventory\MainAsset\NetworkEquipment->rulepassed()
  ./src/Rule.php:1486                                RuleImportAsset->executeActions()
  ./src/RuleCollection.php:1543                      Rule->process()
  ./src/Glpi/Inventory/MainAsset/MainAsset.php:614   RuleCollection->processAllRules()
  ./src/Glpi/Inventory/Inventory.php:855             Glpi\Inventory\MainAsset\MainAsset->handle()
  ./src/Glpi/Inventory/Inventory.php:457             Glpi\Inventory\Inventory->handleItem()
  ...inc/communicationnetworkinventory.class.php:146 Glpi\Inventory\Inventory->doInventory()
  ./marketplace/glpiinventory/hook.php:1022          PluginGlpiinventoryCommunicationNetworkInventory->import()
  ./src/Plugin.php:1857                              plugin_glpiinventory_network_inventory()
  ./src/Glpi/Inventory/Request.php:277               Plugin::doHookFunction()
  ./src/Glpi/Inventory/Request.php:251               Glpi\Inventory\Request->network()
  ./src/Glpi/Inventory/Request.php:99                Glpi\Inventory\Request->networkInventory()
  ...lpi/Agent/Communication/AbstractRequest.php:407 Glpi\Inventory\Request->handleAction()
  ...lpi/Agent/Communication/AbstractRequest.php:340 Glpi\Agent\Communication\AbstractRequest->handleXMLRequest()
  ./src/Glpi/Controller/InventoryController.php:96   Glpi\Agent\Communication\AbstractRequest->handleRequest()
  ...ntory/src/Controller/InventoryController.php:74 Glpi\Controller\InventoryController->index()
  ./vendor/symfony/http-kernel/HttpKernel.php:181    GlpiPlugin\Glpiinventory\Controller\InventoryController->index()
  ./vendor/symfony/http-kernel/HttpKernel.php:76     Symfony\Component\HttpKernel\HttpKernel->handleRaw()
  ./vendor/symfony/http-kernel/Kernel.php:197        Symfony\Component\HttpKernel\HttpKernel->handle()
  ./public/index.php:70                              Symfony\Component\HttpKernel\Kernel->handle()

Page URL

No response

Steps To reproduce

No response

Your GLPI setup information

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions