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

Errors log : "Missing type for Ticket template!" #2210

Closed
btry opened this issue Apr 14, 2021 · 17 comments
Closed

Errors log : "Missing type for Ticket template!" #2210

btry opened this issue Apr 14, 2021 · 17 comments
Assignees

Comments

@btry
Copy link
Collaborator

btry commented Apr 14, 2021

issue reported in GLPI : glpi-project/glpi#8418

@btry btry added the bug label Apr 14, 2021
@btry btry self-assigned this Apr 14, 2021
@btry
Copy link
Collaborator Author

btry commented Apr 14, 2021

Cannot investigate without a complete backtrace (see the backtrace shared in the linked issue)

@phamorais
Copy link

@btry Hi !

follow last 50 lines in backtrace

plugins/formcreator/inc/formanswer.class.php:1001 PluginFormcreatorFormAnswer->generateTarget()
inc/commondbtm.class.php:1173 PluginFormcreatorFormAnswer->post_addItem()
plugins/formcreator/front/form.form.php:142 CommonDBTM->add()

[2021-04-13 18:46:23] glpiphplog.WARNING: *** PHP User Warning (512): Missing type for Ticket template! in /home/paulo/myglpi/glpi/inc/commonitilobject.class.php at line 7957
Backtrace :
inc/commonitilobject.class.php:7957 trigger_error()
inc/commonitilobject.class.php:7918 CommonITILObject->getTemplateFieldName()
inc/commonitilobject.class.php:792 CommonITILObject->getITILTemplateToUse()
inc/ticket.class.php:974 CommonITILObject->handleTemplateFields()
inc/commondbtm.class.php:1484 Ticket->prepareInputForUpdate()
inc/ticket.class.php:2332 CommonDBTM->update()
inc/commonitilactor.class.php:382 Ticket->updateDateMod()
inc/group_ticket.class.php:66 CommonITILActor->post_addItem()
inc/commondbtm.class.php:1173 Group_Ticket->post_addItem()
inc/commonitilobject.class.php:1969 CommonDBTM->add()
inc/ticket.class.php:1924 CommonITILObject->post_addItem()
inc/commondbtm.class.php:1173 Ticket->post_addItem()
plugins/formcreator/inc/targetticket.class.php:808 CommonDBTM->add()
plugins/formcreator/inc/formanswer.class.php:816 PluginFormcreatorTargetTicket->save()
plugins/formcreator/inc/formanswer.class.php:1001 PluginFormcreatorFormAnswer->generateTarget()
inc/commondbtm.class.php:1173 PluginFormcreatorFormAnswer->post_addItem()
plugins/formcreator/front/form.form.php:142 CommonDBTM->add()

[2021-04-13 18:48:08] glpiphplog.WARNING: *** PHP User Warning (512): Missing type for Ticket template! in /home/paulo/myglpi/glpi/inc/commonitilobject.class.php at line 7957
Backtrace :
inc/commonitilobject.class.php:7957 trigger_error()
inc/commonitilobject.class.php:7918 CommonITILObject->getTemplateFieldName()
inc/commonitilobject.class.php:792 CommonITILObject->getITILTemplateToUse()
inc/ticket.class.php:974 CommonITILObject->handleTemplateFields()
inc/commondbtm.class.php:1484 Ticket->prepareInputForUpdate()
inc/ticket.class.php:2332 CommonDBTM->update()
inc/commonitilactor.class.php:382 Ticket->updateDateMod()
inc/group_ticket.class.php:66 CommonITILActor->post_addItem()
inc/commondbtm.class.php:1173 Group_Ticket->post_addItem()
inc/commonitilobject.class.php:1969 CommonDBTM->add()
inc/ticket.class.php:1924 CommonITILObject->post_addItem()
inc/commondbtm.class.php:1173 Ticket->post_addItem()
plugins/formcreator/inc/targetticket.class.php:808 CommonDBTM->add()
plugins/formcreator/inc/formanswer.class.php:816 PluginFormcreatorTargetTicket->save()
plugins/formcreator/inc/formanswer.class.php:1001 PluginFormcreatorFormAnswer->generateTarget()
inc/commondbtm.class.php:1173 PluginFormcreatorFormAnswer->post_addItem()
plugins/formcreator/front/form.form.php:142 CommonDBTM->add()

[2021-04-13 18:50:32] glpiphplog.DEBUG: Html::compileScss() in /home/paulo/myglpi/glpi/inc/html.class.php line 7505
css/palettes/automn.scss is new, loading {"user":"6@myserver"}
[2021-04-13 18:50:32] glpiphplog.DEBUG: Html::compileScss() in /home/paulo/myglpi/glpi/inc/html.class.php line 7505
css/dashboard.scss is new, loading {"user":"6@myserver"}
[2021-04-13 18:50:32] glpiphplog.DEBUG: Html::compileScss() in /home/paulo/myglpi/glpi/inc/html.class.php line 7505
css/styles.scss is new, loading {"user":"6@myserver"}

And "Also, please confirm that the ticket being created has a group in the actors. It seems this is important to reproduce."

the ticket was actually opened without assigning the group or technician

image

I´m GLPI 9.5.5 and Formcreator 2.11.2

@btry
Copy link
Collaborator Author

btry commented Apr 14, 2021

Thank you for your information, but so far I could not reproduce.

The backtrace shows that a relation between a group and the ticket is involved in the bug, and adding a group to the target ticket is not sufficient to generate the error.

Can you show the definition of the actors of the target ticket in Formcreator ? If there are no group added here, can you tell how the group is added to the ticket (ticket template, business rule) ?

@phamorais
Copy link

OIa @btry

Follow the print of the "target"

image

In the environment, the attribution of the Technician or Group to the ticket is used by means of the rule in "ITIL Category" and "Rules of the entity"

1 - I set up the automatic assignment of technicians or groups through ITIL Categories. For that I need to go to the entity configuration and select the option below

image

2 - First I create the ITIL Category and inform which group will attend the ticket

image

3 - When I create the form, select only the category in the "target"

image

@btry
Copy link
Collaborator Author

btry commented Apr 15, 2021

Hi

I created an ITIL category with a group in charge of the ticket, then configured the entity to automatically assign the ticket based on the category.

Running a test form runs without error, then I still don't reproduce. I notice that in your screenshots, the group in charge of the hardware is added in the requesters, instead of the assigned (like it is expected and i observe on my own instance).

@phamorais
Copy link

@btry sorry for delay!

Sorry I did not understand the problem in the statement:
"... I notice that in your screenshots, the group in charge of the hardware is added in the requesters, instead of the assigned (like it is expected and i observe on my own instance)."

See the behavior below in my production instance with GLPI 9.5.4 and Form 2.11.2

image

image
ticket_open

See that the ticket opens without errors, and I have the same configuration in the ITIL Category

image

Targets in Form

image

@stdglpi
Copy link

stdglpi commented Apr 19, 2021

Same error for me (GLPI 9.5.5 with Formcreator 2.11.2

When I'm writing a solution just after "Error 500" and in the Php-errors.log

[2021-04-19 22:34:16] glpiphplog.WARNING: *** PHP User Warning (512): Missing type for Ticket template! in C:\inetpub\wwwroot\GLPI 9.5.5\inc\commonitilobject.class.php at line 7957
Backtrace :
inc\commonitilobject.class.php:7957 trigger_error()
inc\commonitilobject.class.php:7918 CommonITILObject->getTemplateFieldName()
inc\commonitilobject.class.php:792 CommonITILObject->getITILTemplateToUse()
inc\ticket.class.php:974 CommonITILObject->handleTemplateFields()
inc\commondbtm.class.php:1484 Ticket->prepareInputForUpdate()
inc\itilsolution.class.php:372 CommonDBTM->update()
inc\commondbtm.class.php:1173 ITILSolution->post_addItem()
front\itilsolution.form.php:57 CommonDBTM->add()

i'm using ITIL Category for the tickets.

@btry
Copy link
Collaborator Author

btry commented Apr 23, 2021

Hi @stdglpi

If you get an error 500, then you have a 2nd backtrace in the logs of your HTTP server. This may be useful to find the root cause of the problem.

When you write a solution are you in the context of the service catalog ?

@phamorais
Copy link

@btry I update in another GLPI instalation.. with GLPI 9.5.5 and Form 2.11.3, and de the error still the same :(

@btry
Copy link
Collaborator Author

btry commented May 11, 2021

Hi

The original issue on GLPI is reopened because it seems to also occur with the mail collector. We are currently missing data to find the cause of the problem.

@phamorais
Copy link

@btry I can provide ssh access to a test environment for you to access.

@btry
Copy link
Collaborator Author

btry commented May 11, 2021

Good, this would be very nice, but I don't recognize you as a GLPI Network subscriber. If you have a subscription to professional service you should have credentials to request support here : https://services.glpi-network.com/ .

@phamorais
Copy link

@btry
We were partners through Oriontech, but it is in renegotiation.

Anyway, if you want to analyze the incident just let me know. Until then, I will keep pausing the update of the environment.

@btry
Copy link
Collaborator Author

btry commented May 11, 2021

When we thought that the issue was caused by Formcreator, I tried to reproduce, without success. The backtrace involving the mailcollector workflow is a strong clue that Formcreator is not the cause (or root cause) of the bug. I did not investigated further since this event, but @cedric-anne did.

I see 2 possible scenarios:

1

I recommend you follow the issue in GLPI side. As the bug has a significant impact you should probably wait until the solution is identified. Being able to investigate directly in an impacted instance of GLPI should make investigation more efficient, then you shoud resume the partnership renegociation.

2

You said you reproduce on a testing environment. If you have a receipe to reproduce from a fresh GLPI + Formcreator with a very minimal configuration and data set, this may be the key to solve the bug before the partnership renegociation succeeds. In such scenario, please, share all necessary data in the issue opened on GLPI's repo.

@stdglpi
Copy link

stdglpi commented May 12, 2021

from my side the problem start to occur since the GLPI update 9.5.4 to 9.5.5.
Also I always use the mail collector to create my tickets.

This problem happens when I try to :

  • Transfert a ticket to another Entitie
  • Solve a ticket

Have a good day

@btry
Copy link
Collaborator Author

btry commented May 12, 2021

Hi

Thank you @stdglpi for those useful information.

@btry
Copy link
Collaborator Author

btry commented Jul 12, 2021

Hi

A fix for GLPI was found. Closing this issue.

@btry btry closed this as completed Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants