You are not logged in.
Hello everyone,
I am using GLPI 10.0.7 on a CentOS 7 server with PHP version 7.4.30.
I have several existing recurrent tickets that have been working for years. However, recently I needed to create some new recurrent tickets and noticed that they are not being automatically created.
If I try to execute the automatic task and check the php-errors.log, an error appears.
[2023-06-15 21:27:49] glpiphplog.CRITICAL: *** Uncaught Exception TypeError: Argument 1 passed to Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier() must be of the type string, array given, called in /var/www/html/glpi/src/DBmysql.php on line 1265 in /var/www/html/glpi/src/Toolbox/Sanitizer.php at line 227
Backtrace :
src/DBmysql.php:1265 Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier()
src/DBmysql.php:1296 DBmysql::quoteValue()
src/DBmysql.php:1320 DBmysql->buildInsert()
src/CommonDBTM.php:722 DBmysql->insert()
src/CommonDBTM.php:1317 CommonDBTM->addToDB()
src/CommonITILRecurrent.php:588 CommonDBTM->add()
src/CommonITILRecurrentCron.php:92 CommonITILRecurrent->createItem()
src/CronTask.php:1018 CommonITILRecurrentCron::cronRecurrentItems()
front/crontask.form.php:52 CronTask::launch()
cron.log
Interno #1: Executar RecurrentItems
2023-06-15 21:27:49 [7@localhost.localdomain]
Interno #1: Erro durante a execução de RecurrentItems. Verifique em "/var/www/html/glpi/files/_log/php-errors.log" para mais detalhes.
Does anyone know how to fix this issue or what else I can check to try to identify it?
Best regards
Last edited by Registered32 (2023-07-19 04:07:13)
Offline
I cannot recreate the issue. What fields do you have predefined in the template?
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
Hi cconard96,
Title
Request source
Location
Requester
Time to Resolve
Type
Category
Opening date
Technician group
Description
Offline
I still cannot recreate the issue. Do you have any plugins installed?
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
Hi cconard96,
I have some plugins enabled and others that were installed in the past but are disabled and no longer in use.
Should we disable any plugins or delete them?
tks
Offline
Behaviors and Mail Analyzer both use the plugin hooks that let them modify data for tickets before they are added, so I would suggest disabling (not uninstalling) them to rule them out as issues.
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
Hi cconard96,
Thank you for your response.
I have disabled both plugins and tried to force the execution of the automatic action, but the error that returns is the same.
[2023-06-20 13:54:20] glpiphplog.CRITICAL: *** Uncaught Exception TypeError: Argument 1 passed to Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier() must be of the type string, array given, called in /var/www/html/glpi/src/DBmysql.php on line 1265 in /var/www/html/glpi/src/Toolbox/Sanitizer.php at line 227
Backtrace :
src/DBmysql.php:1265 Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier()
src/DBmysql.php:1296 DBmysql::quoteValue()
src/DBmysql.php:1320 DBmysql->buildInsert()
src/CommonDBTM.php:722 DBmysql->insert()
src/CommonDBTM.php:1317 CommonDBTM->addToDB()
src/CommonITILRecurrent.php:588 CommonDBTM->add()
src/CommonITILRecurrentCron.php:92 CommonITILRecurrent->createItem()
src/CronTask.php:1018 CommonITILRecurrentCron::cronRecurrentItems()
front/cron.php:63 CronTask::launch()
[2023-06-20 14:12:27] glpiphplog.CRITICAL: *** Uncaught Exception TypeError: Argument 1 passed to Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier() must be of the type string, array given, called in /var/www/html/glpi/src/DBmysql.php on line 1265 in /var/www/html/glpi/src/Toolbox/Sanitizer.php at line 227
Backtrace :
src/DBmysql.php:1265 Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier()
src/DBmysql.php:1296 DBmysql::quoteValue()
src/DBmysql.php:1320 DBmysql->buildInsert()
src/CommonDBTM.php:722 DBmysql->insert()
src/CommonDBTM.php:1317 CommonDBTM->addToDB()
src/CommonITILRecurrent.php:588 CommonDBTM->add()
src/CommonITILRecurrentCron.php:92 CommonITILRecurrent->createItem()
src/CronTask.php:1018 CommonITILRecurrentCron::cronRecurrentItems()
front/cron.php:63 CronTask::launch()
This situation only occurs with recurrent tickets that were created recently. Recurrent tickets that were created in the past (more than a year ago) are functioning correctly.
Best regards
Offline
I have left only the OAuth2 plugin enabled.
I disabled all the other plugins and removed the ones that are not being used.
I restarted the httpd and performed a new simulation, forcing the automatic action of the Recurrent Ticket to run. However, the message in the logs remains the same.
cron.log
2023-06-20 14:59:17 [7@localhost.localdomain]
Interno #1: Erro durante a execução de RecurrentItems. Verifique em "/var/www/html/glpi/files/_log/php-errors.log" para mais detalhes.
php-errors.log
[2023-06-20 14:55:25] glpiphplog.CRITICAL: *** Uncaught Exception TypeError: Argument 1 passed to Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier() must be of the type string, array give n, called in /var/www/html/glpi/src/DBmysql.php on line 1265 in /var/www/html/glpi/src/Toolbox/Sa nitizer.php at line 227
Backtrace :
src/DBmysql.php:1265 Glpi\Toolbox\Sanitizer::isNsClassOrCallableI dentifier()
src/DBmysql.php:1296 DBmysql::quoteValue()
src/DBmysql.php:1320 DBmysql->buildInsert()
src/CommonDBTM.php:722 DBmysql->insert()
src/CommonDBTM.php:1317 CommonDBTM->addToDB()
src/CommonITILRecurrent.php:588 CommonDBTM->add()
src/CommonITILRecurrentCron.php:92 CommonITILRecurrent->createItem()
src/CronTask.php:1018 CommonITILRecurrentCron::cronRecurrentItems( )
front/crontask.form.php:52 CronTask::launch()
[2023-06-20 14:59:17] glpiphplog.CRITICAL: *** Uncaught Exception TypeError: Argument 1 passed to Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier() must be of the type string, array give n, called in /var/www/html/glpi/src/DBmysql.php on line 1265 in /var/www/html/glpi/src/Toolbox/Sa nitizer.php at line 227
Backtrace :
src/DBmysql.php:1265 Glpi\Toolbox\Sanitizer::isNsClassOrCallableI dentifier()
src/DBmysql.php:1296 DBmysql::quoteValue()
src/DBmysql.php:1320 DBmysql->buildInsert()
src/CommonDBTM.php:722 DBmysql->insert()
src/CommonDBTM.php:1317 CommonDBTM->addToDB()
src/CommonITILRecurrent.php:588 CommonDBTM->add()
src/CommonITILRecurrentCron.php:92 CommonITILRecurrent->createItem()
src/CronTask.php:1018 CommonITILRecurrentCron::cronRecurrentItems( )
front/crontask.form.php:52 CronTask::launch()
Offline
All recurring tickets that I have and are functional were created in versions prior to version 10.
In previous versions, the action that created recurring tickets was called 'ticketrecurrent', but now it is called 'RecurrentItems'. I believe only the name has changed, but it's something I noticed while trying to solve the issue.
Another difference I noticed is the item type.
Offline
The GLPI server I have is separate from the database.
I performed a new test.
I created a new server and installed GLPI 10.0.7 on a Debian 12 server.
I didn't create a new database server or change its version.
When trying to run recurring tickets, I'm still getting the same error.
[2023-06-24 21:17:12] glpiphplog.CRITICAL: *** Uncaught Exception TypeError: Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, array given, called in /var/www/html/glpi/src/DBmysql.php on line 1265 in /var/www/html/glpi/src/Toolbox/Sanitizer.php at line 227
Backtrace :
src/DBmysql.php:1265 Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier()
src/DBmysql.php:1296 DBmysql::quoteValue()
src/DBmysql.php:1320 DBmysql->buildInsert()
src/CommonDBTM.php:722 DBmysql->insert()
src/CommonDBTM.php:1317 CommonDBTM->addToDB()
src/CommonITILRecurrent.php:588 CommonDBTM->add()
src/CommonITILRecurrentCron.php:92 CommonITILRecurrent->createItem()
src/CronTask.php:1018 CommonITILRecurrentCron::cronRecurrentItems()
front/crontask.form.php:52 CronTask::launch()
Offline
I made a new test.
I created a new recurring ticket and linked it to a ticket template that is working in another recurring ticket.
Unfortunately, it didn't work either.
What has been tested so far:
Disabled plugins.
Uninstalled and deleted unused plugins.
I installed a new GLPI server (Debian 12) but connected it to the existing database.
Attempted to create a recurring ticket using a template that is working in a recurring ticket created years ago and is currently functioning.
What else can I test?
Offline
Hi everyone,
I don't know what else I can test.
Does anyone have any suggestions?
Best regards
Offline
Does Anyone have any ideas?
Offline
Hi everyone,
Today I took two new tests.
I installed GLPI 10.0.7 and 10.0.9 (on Debian 12) and connected to my production MySQL server to create a new database. Recurrent tickets were created normally.
Based on this, I believe the problem does not lie with my MySQL version.
Afterward, I deleted the entire GLPI folder on my production server and reinstalled version 10.0.7. However, the problem still persists.
Therefore, I suspect there might be something wrong with my production database.
Does anyone have any ideas on how I can test the production database?
The tests were performed on VMs cloned from the production environment.
Best regards
Offline
After several tests, the problem was solved in a simple way.
I disabled all recurring tickets, changed the next execution to be done today, and started enabling them one by one until I found the one that was causing the others to freeze.
A linked ticket model had a Switch element associated with the recurring ticket.
After removing the Switch from the ticket model, all the recurring tickets created afterwards started working.
Best regards
Offline