Skip to content

Bug: Behaviors plugin blocks change creation in GLPI 11.0.1 #37

@hakimbedja

Description

@hakimbedja

When the Behaviors plugin is activated in GLPI version 11.0.1, creating a new change fails.
After filling out the change form and clicking "Add," the user sees a "An error occurred" page.

The creation fails with an error page, and the change is not saved.

Error log (from php-errors.log):
glpi.CRITICAL: *** Uncaught PHP Exception TypeError: "GlpiPlugin\Behaviors\Change::beforeAdd(): Argument #1 ($change) must be of type GlpiPlugin\Behaviors\Change, Change given, called in ./src/Plugin.php on line 1719" at Change.php line 47
Backtrace :
./marketplace/behaviors/src/Change.php:47
./src/Plugin.php:1719 GlpiPlugin\Behaviors\Change::beforeAdd()
./src/CommonDBTM.php:1334 Plugin::doHook()
./front/change.form.php:56 CommonDBTM->add()
...Glpi/Controller/LegacyFileLoadController.php:64 require()
./vendor/symfony/http-kernel/HttpKernel.php:181 Glpi\Controller\LegacyFileLoadController->__invoke()
./vendor/symfony/http-kernel/HttpKernel.php:76 Symfony\Component\HttpKernel\HttpKernel->handleRaw()
./vendor/symfony/http-kernel/Kernel.php:197 Symfony\Component\HttpKernel\HttpKernel->handle()
./public/index.php:70 Symfony\Component\HttpKernel\Kernel->handle()

Additional information:

GLPI version: 11.0.1
Behaviors plugin version: 3.0.1
Browser: chrome latest
No other plugins conflict detected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions