glpi-project / glpi-inventory-plugin

GLPI Inventory plugin
GNU Affero General Public License v3.0
46 stars 27 forks source link

[Update process] Error on update from 1.3.1 to 1.3.2 #436

Closed keguira closed 1 year ago

keguira commented 1 year ago

Describe the bug

During update process, on my test-environment, i got the following error message in the interface :

image

From php.log, i have this error :

[2023-11-03 15:20:49] glpiphplog.CRITICAL:   *** Uncaught Exception Error: Call to undefined method DB::doQueryOrDie() in /home/glpi/public_html/glpi-10.0.10/marketplace/glpiinventory/install/update.native.php at line 388
  Backtrace :
  marketplace/glpiinventory/hook.php:405             pluginGlpiinventoryUpdateNative()
  src/Plugin.php:915                                 plugin_glpiinventory_install()
  :                                                  Plugin->install()
  src/Marketplace/Controller.php:545                 call_user_func()
  src/Marketplace/Controller.php:435                 Glpi\Marketplace\Controller->setPluginState()
  ajax/marketplace.php:82                            Glpi\Marketplace\Controller->installPlugin()
  public/index.php:82                                require()

I'm trying to update from 1.3.1 to 1.3.2

To reproduce

  1. Download update from market place
  2. Click on update

Expected behavior

The update is processed correctly and applied without error

Operating system

Linux

GLPI Agent version

1.5

GLPI version

10.0.10

GLPIInventory plugin

1.3.1 to 1.3.2

Additional context

Server is

Gor3pig commented 1 year ago

I confirm. Same thing here, with the same version as the author of the message.

Bug

trasher commented 1 year ago

As a quick fix, replace doQueryOrDie with queryOrDie in install/update.netiv.php file.

UI issue is yet another problem...

trasher commented 1 year ago

(bug introduced in #431)

keguira commented 1 year ago

As a quick fix, replace doQueryOrDie with queryOrDie in install/update.netiv.php file.

UI issue is yet another problem...

ok, i confirm this fixed the update process.