pluginsGLPI / ocsinventoryng

Plugin ocsinventoryng for GLPI
GNU General Public License v2.0
68 stars 52 forks source link

Log noyé sous les erreurs ( 1 giga en 1 journée ) #362

Open jlb5980 opened 1 year ago

jlb5980 commented 1 year ago

Bonjour

A chaque import des machines d'ocs à glpi je recupére dans le log php-error de glpi

2023-06-23 11:53:34] glpiphplog.WARNING: *** PHP User Warning (512): Relation between "glpi_networkports" and "glpi_plugin_ocsinventoryng_networkports" table based on "networkports_id" field cannot be handled automatically as "networkports_id" also corresponds to index field of the target table. in /data/glpiv/src/DbUtils.php at line 2099 Backtrace : src/DbUtils.php:2099 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/MassiveAction.php:1495 CommonDBTM->delete() src/MassiveAction.php:1408 MassiveAction::processMassiveActionsForOneItemtype() src/MassiveAction.php:1386 MassiveAction->processForSeveralItemtypes() front/massiveaction.php:59 MassiveAction->process()

Cc message je le rencontre également dans le ocsng_fullsync.log qui est d'ailleurs noyer sous les messages d'erreurs de ce type !

Et encore bravo pour le maintien du plugin . Cordialement

eilkh commented 1 year ago

Bonjour, même problème de mon coté...

The version of the plugin. : ocsinventoryng 2.0.4 The version of your GLPI : 10.0.9 The steps to reproduce your issue :

ajavor commented 1 year ago

hurray, @tsmr is back! thanks a lot for this fix, it works :)

eilkh commented 1 year ago

Thank you !!

jlb5980 commented 11 months ago

Merci

hiscorebob commented 10 months ago

Hi We have noticed the same issue in our setup, with GLPI updated to latest version 10.0.10. The fixed hook.php doesn't seem to work for this version.

Thank you for any help or idea!

Kind Regards

blippercop commented 7 months ago

@hiscorebob Can you give more details what is not working?

hiscorebob commented 7 months ago

@hiscorebob Can you give more details what is not working?

Automated sync with shell scripts are not working. I see a lot of following errors in glpi/files/_log/php-errors.log:

CRITICAL: *** Uncaught Exception Error: Call to a member function add() on null in /var/www/html/glpi/marketplace/ocsinventoryng/inc/networkport.class.php at line 270

WARNING: *** PHP User Warning (512): Relation between "glpi_networkports" and "glpi_plugin_ocsinventoryng_networkports" table based on "networkports_id" field cannot be handled automatically as "networkports_id" also corresponds to index field of the target table. in /var/www/html/glpi/src/DbUtils.php at line 2131 Backtrace : src/DbUtils.php:2131 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/CommonDBTM.php:4631 CommonDBTM->delete() marketplace/ocsinventoryng/inc/os.class.php:254 CommonDBTM->deleteByCriteria()

roms2000 commented 4 months ago

@hiscorebob Latest commit 8433a48 fix the issue, download it from here : https://github.com/pluginsGLPI/ocsinventoryng/archive/8433a4822d7693619981adfcd0c5a934633a55ec.zip