glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.13k stars 1.28k forks source link

Webhooks new form broken #17846

Closed orthagh closed 4 days ago

orthagh commented 4 days ago
[2024-09-13 10:20:57] glpiphplog.CRITICAL:   *** Twig Error (Twig\Error\RuntimeError): "An exception has been thrown during the rendering of a template ("Class name must be a valid object or a string")." in template "/var/www/html/glpi/main/templates/pages/setup/webhook/webhook.html.twig" at line 45
  Backtrace :
  ...es/c7/c7414374327f0c283149304630a5cfa7.php:1171 Twig\Template->yieldBlock()
  vendor/twig/twig/src/Template.php:430              __TwigTemplate_2c34125655dbfbbe4ab849d98eabeeda->block_form_fields()
  ...tes/c7/c7414374327f0c283149304630a5cfa7.php:103 Twig\Template->yieldBlock()
  vendor/twig/twig/src/Template.php:360              __TwigTemplate_2c34125655dbfbbe4ab849d98eabeeda->doDisplay()
  ...ates/68/68f830842b4c572d97395f8fe5ba66d6.php:50 Twig\Template->yield()
  vendor/twig/twig/src/Template.php:360              __TwigTemplate_4d5bbf4d768f6334a3d5fa9baa112db4->doDisplay()
  vendor/twig/twig/src/Template.php:327              Twig\Template->yield()
  vendor/twig/twig/src/TemplateWrapper.php:45        Twig\Template->display()
  src/Glpi/Application/View/TemplateRenderer.php:185 Twig\TemplateWrapper->display()
  src/Webhook.php:723                                Glpi\Application\View\TemplateRenderer->display()
  src/CommonGLPI.php:658                             Webhook->showForm()
  ajax/common.tabs.php:110                           CommonGLPI::displayStandardTab()
  ...Glpi/Controller/LegacyFileLoadController.php:58 require()
  vendor/symfony/http-kernel/HttpKernel.php:101      Glpi\Controller\LegacyFileLoadController->Glpi\Controller\{closure}()
  ...ymfony/http-foundation/StreamedResponse.php:106 Symfony\Component\HttpKernel\HttpKernel::Symfony\Component\HttpKernel\{closure}()
  vendor/symfony/http-foundation/Response.php:423    Symfony\Component\HttpFoundation\StreamedResponse->sendContent()
  public/index.php:58    

Can we add tests on that ? (unit, E2E ?)

flegastelois commented 4 days ago

Duplicate https://github.com/glpi-project/glpi/issues/17837