Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[main] Twig Error in template "templates/pages/setup/webhook/webhook.html.twig" #17837

Open
2 tasks done
flegastelois opened this issue Sep 11, 2024 · 1 comment
Open
2 tasks done
Assignees
Milestone

Comments

@flegastelois
Copy link
Member

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Version

main

Bug description

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 "glpi-core/main/htdocs/templates/pages/setup/webhook/webhook.html.twig" at line 45

image

This seems to be happening since this commit d75c417

Webhook::getAPIItemtypeData no longer returns the same array.

Example before the mentionned commit:
Capture d’écran du 2024-09-11 17-32-18

After the mentionned commit:
Capture d’écran du 2024-09-11 17-29-13

Notice the "10 > Glpi\CustomeAsset\Voiture", which must certainly be the cause of the error generated (10 not being an itemtype)

Relevant log output

No response

Page URL

front/webhook.form.php

Steps To reproduce

To reproduce the bug, you need to have a generic object (created from front/asset/assetdefinition.php).
Once you have a generic object, just go to the webhook creation page.

Your GLPI setup information

No response

Anything else?

No response

@orthagh
Copy link
Contributor

orthagh commented Sep 13, 2024

Preview tab of a existing webhook is broken also with the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants