fusioninventory-for-glpi icon indicating copy to clipboard operation
fusioninventory-for-glpi copied to clipboard

XML import on FI 10.0.1 seems broken

Open paulz1 opened this issue 3 years ago • 2 comments

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)

  1. It shows empty page

  2. 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()
  1. 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

paulz1 avatar Oct 06 '22 15:10 paulz1

10.0.1+1.0 version is not compatible with version 10.0.3 of GLPI. The version will be released this week end.

ddurieux avatar Oct 06 '22 15:10 ddurieux

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.

paulz1 avatar Oct 06 '22 15:10 paulz1

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

ana6ioz avatar Oct 18 '22 14:10 ana6ioz

Thanks @ana6ioz , it works perfectly

paulz1 avatar Nov 07 '22 14:11 paulz1