glpi
glpi copied to clipboard
Error 512 pending reason
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- [X] I have searched the existing issues
Version
GLPI 10.0.1
Bug description
Hello,
I have often this error when I'm on ticket and I wanted to add a task model with pending status.
Possible to help ?
thank you
Relevant log output
[2022-06-16 17:54:06] glpiphplog.WARNING: *** PHP Warning (2): Undefined array key "pendingreasons_id" in C:\inetpub\wwwroot\glpi\src\CommonITILTask.php at line 630
Backtrace :
src\CommonDBTM.php:1298 CommonITILTask->post_addItem()
front\commonitiltask.form.php:67 CommonDBTM->add()
front\tickettask.form.php:39 include()
[2022-06-16 17:54:06] glpiphplog.WARNING: *** PHP User Warning (512): Failed to create PendingReason_Item in C:\inetpub\wwwroot\glpi\src\PendingReason_Item.php at line 102
Backtrace :
src\PendingReason_Item.php:102 trigger_error()
src\CommonITILTask.php:632 PendingReason_Item::createForItem()
src\CommonDBTM.php:1298 CommonITILTask->post_addItem()
front\commonitiltask.form.php:67 CommonDBTM->add()
front\tickettask.form.php:39 include()
[2022-06-16 17:54:06] glpiphplog.WARNING: *** PHP Warning (2): Undefined array key "pendingreasons_id" in C:\inetpub\wwwroot\glpi\src\CommonITILTask.php at line 635
Backtrace :
src\CommonDBTM.php:1298 CommonITILTask->post_addItem()
front\commonitiltask.form.php:67 CommonDBTM->add()
front\tickettask.form.php:39 include()
[2022-06-16 17:54:06] glpiphplog.WARNING: *** PHP User Warning (512): Failed to create PendingReason_Item in C:\inetpub\wwwroot\glpi\src\PendingReason_Item.php at line 102
Backtrace :
src\PendingReason_Item.php:102 trigger_error()
src\CommonITILTask.php:637 PendingReason_Item::createForItem()
src\CommonDBTM.php:1298 CommonITILTask->post_addItem()
front\commonitiltask.form.php:67 CommonDBTM->add()
front\tickettask.form.php:39 include()
Page URL
No response
Steps To reproduce
No response
Your GLPI setup information
No response
Anything else?
No response
Same problem here.
[2022-06-27 09:33:51] glpiphplog.WARNING: *** PHP User Warning (512): Failed to create PendingReason_Item in /usr/share/glpi/src/PendingReason_Item.php at line 102 Backtrace : src/PendingReason_Item.php:102 trigger_error() src/CommonITILTask.php:632 PendingReason_Item::createForItem() src/CommonDBTM.php:1298 CommonITILTask->post_addItem() front/commonitiltask.form.php:67 CommonDBTM->add() front/tickettask.form.php:39 include()
[2022-06-27 09:33:51] glpiphplog.WARNING: *** PHP User Warning (512): Failed to create PendingReason_Item in /usr/share/glpi/src/PendingReason_Item.php at line 102 Backtrace : src/PendingReason_Item.php:102 trigger_error() src/CommonITILTask.php:637 PendingReason_Item::createForItem() src/CommonDBTM.php:1298 CommonITILTask->post_addItem() front/commonitiltask.form.php:67 CommonDBTM->add() front/tickettask.form.php:39 include()
Can you provide steps to recreate the issue?
Hello @cconard96
I don't know how to reproduce exactly this bug but it's random.
What I can say it's when I want to add a task with a pending status and I click "add".
GLPI 10.0.2
Relevant log output
[2022-08-01 09:27:02] glpiphplog.WARNING: *** PHP Warning (2): Undefined array key "pendingreasons_id" in C:\inetpub\wwwroot\glpi\src\CommonITILTask.php at line 630
Backtrace :
src\CommonDBTM.php:1305 CommonITILTask->post_addItem()
front\commonitiltask.form.php:67 CommonDBTM->add()
front\tickettask.form.php:39 include()
[2022-08-01 09:27:03] glpiphplog.WARNING: *** PHP User Warning (512): Failed to create PendingReason_Item in C:\inetpub\wwwroot\glpi\src\PendingReason_Item.php at line 102
Backtrace :
src\PendingReason_Item.php:102 trigger_error()
src\CommonITILTask.php:632 PendingReason_Item::createForItem()
src\CommonDBTM.php:1305 CommonITILTask->post_addItem()
front\commonitiltask.form.php:67 CommonDBTM->add()
front\tickettask.form.php:39 include()
On SQL logs I have also that about "Pending"
[2022-08-01 09:27:03] glpisqllog.ERROR: DBmysql::query() in C:\inetpub\wwwroot\glpi\src\DBmysql.php line 370
*** MySQL query error:
SQL: INSERT INTO glpi_pendingreasons_items
(pendingreasons_id
, followup_frequency
, followups_before_resolution
, itemtype
, items_id
, last_bump_date
) VALUES (NULL, '0', '0', 'TicketTask', '809', '2022-08-01 09:27:02')
Error: Column 'pendingreasons_id' cannot be null
Backtrace :
src\DBmysql.php:1312
src\CommonDBTM.php:705 DBmysql->insert()
src\CommonDBTM.php:1304 CommonDBTM->addToDB()
src\PendingReason_Item.php:100 CommonDBTM->add()
src\CommonITILTask.php:637 PendingReason_Item::createForItem()
src\CommonDBTM.php:1305 CommonITILTask->post_addItem()
front\commonitiltask.form.php:67 CommonDBTM->add()
front\tickettask.form.php:39 include()
{"user":"22@","mem_usage":"0.002", 2.46Mio)"}
Before you add the task, is there a pending reason template selected and are the pending reason options populated properly?
Hello @cconard96
I have created just one template for the "pending reason" to test it in internal. By default when I put a ticket on "pending" the "pending reason" is uncheck.
By default
If I choose a template
Hi @cconard96,
If it helps, i experienced these same logs precisely when in Dropdowns > Assitance > Pending reason i had no template and at the same time the cron was still in scheduled mode. If you disable it, the message disappears or if you create at least one Pending reason template.
It was based on GLPI 10.0.2
There has been no activity on this issue for some time and therefore it is considered stale and will be closed automatically in 10 days.
If this issue is related to a bug, please try to reproduce on latest release. If the problem persist, feel free to add a comment to revive this issue. If it is related to a new feature, please open a topic to discuss with community about this enhancement on suggestion website.
You may also consider taking a subscription to get professionnal support or contact GLPI editor team directly.
Hello
@giovanny07 @miguelanruiz and I seems to have the same issue.
I have now the GLPI v10.0.0.3.. I think I have the same problem as the error does not come at all times I will confirm it here.
regards,
Hi there,
Error log was completely fixed, there are some defective scenarios with form. For example, when you put in a followup, set pending status then choose a reason, and for last step you deactivate pending... you will get a bad form.
There has been no activity on this issue for some time and therefore it is considered stale and will be closed automatically in 10 days.
If this issue is related to a bug, please try to reproduce on latest release. If the problem persist, feel free to add a comment to revive this issue. If it is related to a new feature, please open a topic to discuss with community about this enhancement on suggestion website.
You may also consider taking a subscription to get professionnal support or contact GLPI editor team directly.
Initial error has been fixed. If there are other problems remaining, please create new issues.