fusioninventory-for-glpi
fusioninventory-for-glpi copied to clipboard
XML import on FI 10.0.1 seems broken
GLPI version : 10.0.3 FI version : 10.0.1+1.0
It seems that Import using XML file seems to be broken on fusioninventory 10.0.*
When we do : FusionInventory -> Tâches (Tasks?) -> Importer un fichier XML de l'agent (Import XML file)
-
It shows empty page
-
In the GLPI log we see :
[2022-10-06 14:56:35] glpiphplog.CRITICAL: *** Uncaught Exception ArgumentCountError: Too few arguments to function PluginFusioninventoryInventoryComputerImportXML::showForm(), 0 passed in /usr/share/glpi/plugins/fusioninventory/front/inventorycomputerimportxml.php on line 105 and at least 1 expected in /usr/share/glpi/plugins/fusioninventory/inc/inventorycomputerimportxml.class.php at line 74
Backtrace :
...entory/front/inventorycomputerimportxml.php:105 PluginFusioninventoryInventoryComputerImportXML->showForm()
- When we look at these files :
In inc/inventorycomputerimportxml.class.php : https://github.com/fusioninventory/fusioninventory-for-glpi/blob/5d9a23a0283b05fe25d2800c02a0189d4799ac6b/inc/inventorycomputerimportxml.class.php#L74
But in front/inventorycomputerimportxml.php : https://github.com/fusioninventory/fusioninventory-for-glpi/blob/5d9a23a0283b05fe25d2800c02a0189d4799ac6b/front/inventorycomputerimportxml.php#L105
10.0.1+1.0 version is not compatible with version 10.0.3 of GLPI. The version will be released this week end.
Sure. But, we were on 10.0.2 GLPI version some days ago, but the problem existed already (still it wasn't 10.0.1 version).
When I look in the code in branch glpi10.0.2 : I see the same problem between call and showForm() and showForm signature : showForm($id, $options = []).
I understand that running 10.0.1+1.0 with GLPI 10.0.3 could lead to some problem. I beg to open this issue as I think that there is some problem in the code. But of course, I'm not familiar with FI code and it could be that I don't understand the situation/problem.
Sure. But, we were on 10.0.2 GLPI version some days ago, but the problem existed already (still it wasn't 10.0.1 version).
When I look in the code in branch glpi10.0.2 : I see the same problem between call and
showForm()and showForm signature :showForm($id, $options = []).I understand that running 10.0.1+1.0 with GLPI 10.0.3 could lead to some problem. I beg to open this issue as I think that there is some problem in the code. But of course, I'm not familiar with FI code and it could be that I don't understand the situation/problem.
/var/www/html/glpi/plugins/fusioninventory/front/inventorycomputerimportxml.php line 105: $pfInventoryComputerImportXML->showForm (); you need change this to: $pfInventoryComputerImportXML->showForm ([]); after import work :D
Thanks @ana6ioz , it works perfectly