You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2018-04-11 16:14:04

amma35
Moderator
Registered: 2017-02-08
Posts: 58

[Plugin webservice] 9.2 Fatal error

Are you planning to release this plugin for GLPI version 9.2?

I tested the version of the trunk, a small error returned:

In the consultation of the "webservices" methods of the client:

Fatal error: Cannot use [] for reading in D:\wamp64\www\glpi921\plugins\webservices\inc\methodinventaire.class.php on line 745

Patch :

Index: methodinventaire.class.php
===================================================================
--- methodinventaire.class.php	(revision 453)
+++ methodinventaire.class.php	(working copy)
@@ -742,7 +742,7 @@
          return $resp;
       }
 
-      $resp  = array()[];
+      $resp  = [];

Thank you in advance

Offline

#2 2018-04-11 16:20:47

btry
Moderator
Registered: 2015-10-01
Posts: 588

Re: [Plugin webservice] 9.2 Fatal error

Hi

The plugin is hosted here: https://forge.glpi-project.org/projects/webservices

You should request to be reporter or contributor for the plugin.


No support with MP - Always run an upgrade task on a testing instance before running it on production! Always backup before any upgrade task!

Offline

#3 2018-04-17 16:21:30

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,273

Re: [Plugin webservice] 9.2 Fatal error

amma35: already corrected for me.
I wait final tests from a user to publish the plugin (i have no time to test all parts)


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#4 2018-06-02 15:21:46

michel.ing93
Member
From: Marseille
Registered: 2014-01-29
Posts: 39

Re: [Plugin webservice] 9.2 Fatal error

Hello Ylien, What about your labours on Webservices ? I am testing it on GLPI 9.2.3 and I receive this message :
Fatal error: Cannot use [] for reading in /var/www/html/glpi/plugins/webservices/inc/methodinventaire.class.php on line 745
Thank your for your attention ! With best regards, Mikhael.

Offline

#5 2018-06-02 15:24:49

michel.ing93
Member
From: Marseille
Registered: 2014-01-29
Posts: 39

Re: [Plugin webservice] 9.2 Fatal error

PS : Furthemore, Webservices provides only these methods :
glpi.test                Webservices    PluginWebservicesMethodCommon::methodTest                ok
glpi.status                Webservices    PluginWebservicesMethodCommon::methodStatus            ok
glpi.listAllMethods        Webservices    PluginWebservicesMethodCommon::methodList                ok
glpi.listEntities                Webservices    PluginWebservicesMethodCommon::methodListEntities                ok
glpi.doLogin            Webservices    PluginWebservicesMethodSession::methodLogin                ok
glpi.listKnowBaseItems    Webservices    PluginWebservicesMethodTools::methodListKnowBaseItems            ok
glpi.getKnowBaseItem    Webservices    PluginWebservicesMethodTools::methodGetKnowBaseItem        ok

Offline

#6 2018-06-02 15:29:51

michel.ing93
Member
From: Marseille
Registered: 2014-01-29
Posts: 39

Re: [Plugin webservice] 9.2 Fatal error

PPS : I'm testing your 1.8.0 version.

Offline

#7 2018-06-04 08:38:32

michel.ing93
Member
From: Marseille
Registered: 2014-01-29
Posts: 39

Re: [Plugin webservice] 9.2 Fatal error

Hello amma35, Your patch is working well :-) Thank you.

Offline

#8 2018-06-04 15:38:22

michel.ing93
Member
From: Marseille
Registered: 2014-01-29
Posts: 39

Re: [Plugin webservice] 9.2 Fatal error

The import of CSV files works perfect with Webservices 1.8 and GLPI 9.2.4 Thank you :-)

/usr/bin/php /var/www/html/glpi/plugins/datainjection/testwebservice.php
--host=HOSTNAME
--url=glpi/plugins/webservices/xmlrpc.php
--username=glpi
--password=glpi
--uri=http://HOSTNAME/glpi/plugins/download/NOMDEFICHIER.csv
--models_id=3
--entities_id=0

PS : "models_id" is the id in the database of the model created in plugin DataInjection.

PPS : You need also to have every field in your CSV between double quotes : "field".

Enjoy

Offline

#9 2018-06-04 18:33:10

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,273

Re: [Plugin webservice] 9.2 Fatal error

New version published this day (1.8.0)


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

Board footer

Powered by FluxBB