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 warning with 10.0.7 #361

Open
liedekef opened this issue Jun 16, 2023 · 9 comments
Open

PHP warning with 10.0.7 #361

liedekef opened this issue Jun 16, 2023 · 9 comments

Comments

@liedekef
Copy link

Hi,
running ocsi inventory ng version 2.0.4 on GLPI 10.0.7, I see a lot of these PHP warnings in the GLPI error log:

[2023-06-16 13:21:38] glpiphplog.WARNING:   *** PHP Warning (2): Undefined array key "ocsservers_id" in /var/www/glpi/marketplace/ocsinventoryng/hook.php at line 1377
[2023-06-16 13:21:38] glpiphplog.WARNING:   *** PHP Warning (2): Undefined array key "plugin_ocsinventoryng_ocsservers_id" in /var/www/glpi/marketplace/ocsinventoryng/hook.php at line 1379
[2023-06-16 13:22:43] 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 /var/www/glpi/src/DbUtils.php at line 2099

While the first 2 can be contributed to the fact I haven't defined OCSI servers yet, it should still be handled more elegant :-)
Next to that, the last one seems something that certainly needs fixing ...

@jlb5980
Copy link

jlb5980 commented Jun 30, 2023

Hello have you found a solution ?

@liedekef
Copy link
Author

Haven't investigated further. Also it seems nobody of the devs is reacting in any way, and the main glpi dev-guys don't bother as well. Too bad, but it seems the plugins are being neglected a lot in my opinion.

@jackburton79
Copy link

Sorry, I don't have much time at the moment.
Moreover I'm not the original developer, I Just forked the plugin to be able to use It on glpi 10. We've not upgraded our instance, yet.

@liedekef
Copy link
Author

I'm guessing the indexes need to be named differently for ocsi: the index names seem to collide with those of regular glpi prefixing them with 'ocsi_' or so might already be sufficient.

@Roland-GoIT
Copy link

Is there any way to fix this error? Or offer a solution.

@jmichault
Copy link

Have you tried to set index networkports_id as non unique ?

@tontonrico
Copy link

Hi,
about the same problem for me.

config : Debian 12 - OCS 2.10 - GLPI 10.0.11

PHP Warning: 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 /.../.../DbUtils.php on line 2154

@Roland-GoIT
Copy link

Creation of dynamic property PluginOcsinventoryngOcsDbClient::$dbname is deprecated in /var/www/html/plugins/ocsinventoryng/inc/ocsdbclient.class.php at line 55

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

7 participants