Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP User Warning when GLPI user is deleted #353

Open
emilfazzi opened this issue Apr 14, 2023 · 2 comments
Open

PHP User Warning when GLPI user is deleted #353

emilfazzi opened this issue Apr 14, 2023 · 2 comments

Comments

@emilfazzi
Copy link

The reported PHP Warning appears when deleting a GLPI user.

  • Plugin version: 2.0.4
  • GLPI version: 10.0.7

How to reproduce

  • Create a GLPI user
  • Put the user in trashbin
  • Delete permanently the user from trashbin

PHP error log in glpi/files/_log/php-errors.log contains:

[2023-04-14 10:26:53] 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 /usr/share/glpi/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/CommonDBConnexity.php:127                      CommonDBTM->delete()
  src/CommonDBTM.php:986                             CommonDBConnexity->cleanDBonItemDelete()
  src/User.php:437                                   CommonDBTM->deleteChildrenAndRelationsFromDb()
  src/CommonDBTM.php:783                             User->cleanDBonPurge()
  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()
  
[2023-04-14 10:26:53] 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 /usr/share/glpi/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()
@kabassanov
Copy link

Similar issue: #355

@Mirkk
Copy link

Mirkk commented Nov 22, 2023

Ciao @emilfazzi, the commit 8433a48 by @tsmr should resolve this. However, the very similar #355 seems not to be solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants