glpi icon indicating copy to clipboard operation
glpi copied to clipboard

Error in the right panel of tickets

Open LucianaCabrera opened this issue 1 year ago • 6 comments

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

10.0.16

Bug description

Error in the right panel of tickets, Whenever I move to another entity, the right ticket panel disappears and I get the following error: Twig Error (Twig\Error\RuntimeError): "An exception was thrown during rendering of a template ('Empty inputs are not allowed')." in template "/var/www/glpi/templates/components/itilobject/fields_panel.html.twig" on line 216

Relevant log output

[``](url)


Screenshot_20241007_101344

I have cleared the rm-rf template cache inside the files/

I have run the command bin/console glpi:cache:clear but there were no changes

[2024-10-17 18:58:54] glpiphplog.CRITICAL: *** Twig Error (Twig\Error\RuntimeError): "An exception has been thrown during the rendering of a template ("Empty IN are not allowed")." in template "/var/www/html/glpi/templates/components/itilobject/fields_panel.html.twig" at line 209 Backtrace : vendor/twig/twig/src/Template.php:367 Twig\Template->displayWithErrorHandling() vendor/twig/twig/src/Template.php:379 Twig\Template->display() vendor/twig/twig/src/TemplateWrapper.php:38 Twig\Template->render() .../twig/twig/src/Extension/CoreExtension.php:1347 Twig\TemplateWrapper->render() ...tes/2e/2e1acab12523aa17a00f919c92637dc6.php:152 twig_include() vendor/twig/twig/src/Template.php:394 __TwigTemplate_b00fc822dd5619998d19e5ea023413b4->doDisplay() vendor/twig/twig/src/Template.php:367 Twig\Template->displayWithErrorHandling() vendor/twig/twig/src/TemplateWrapper.php:45 Twig\Template->display() src/Application/View/TemplateRenderer.php:184 Twig\TemplateWrapper->display() src/Ticket.php:4433 Glpi\Application\View\TemplateRenderer->display() src/CommonGLPI.php:680 Ticket->showForm() ajax/common.tabs.php:120 CommonGLPI::displayStandardTab() public/index.php:82 require()

root@PC-Luciana:/var/www/html/glpi/files/_log#

LucianaCabrera avatar Oct 07 '24 19:10 LucianaCabrera

I have a database where this error that was mentioned some time ago is replicated in different versions, I cannot pass it through GitHub since it is a client database, could you contact me please?

LucianaCabrera avatar Oct 18 '24 17:10 LucianaCabrera

Hi @LucianaCabrera

To address this, you can try resetting the entity caches by running the following SQL query:

UPDATE glpi_entities SET ancestors_cache = null, sons_cache = null;

This query clears potential cache issues that might be affecting entity-related data display.

Best regards

stonebuzz avatar Oct 18 '24 19:10 stonebuzz

Perfect, it works, thanks ^^!

LucianaCabrera avatar Oct 18 '24 19:10 LucianaCabrera

@cedric-anne

We need to add this SQL query when we run php bon/console cache:clear to be sure that MySQL "cache" is unset !

stonebuzz avatar Oct 18 '24 21:10 stonebuzz

@cedric-anne

We need to add this SQL query when we run php bon/console cache:clear to be sure that MySQL "cache" is unset !

If we do that, we must handle all tables that uses a database cache, there are several other cases that would be affected.

trasher avatar Oct 21 '24 06:10 trasher

@cedric-anne

We need to add this SQL query when we run php bon/console cache:clear to be sure that MySQL "cache" is unset !

Honestly, I think that cache in database should not exist. Also, I guess there is a bug behind this issue. If something is generating invalid data, or if something is not updating these fields correctly, then it should be fixed.

Clearing these values could indeed help, but, in a production environment, people should never have to clear the cache by themselves.

cedric-anne avatar Oct 22 '24 08:10 cedric-anne

Doing both the SQL query + cache clear fixed it for me

UPDATE glpi_entities SET ancestors_cache = null, sons_cache = null;

php bin/console cache:clear

jfael-isol avatar Dec 04 '24 11:12 jfael-isol

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.

github-actions[bot] avatar Feb 03 '25 08:02 github-actions[bot]