[GLPI 10.0.0] [FC 2.13.0-rc1] Counters dashboard empty
Describe the bug Upgraded from GLPI 9.5.7 and Formcreator 2.12.5 directly to GLPI 10.0.1 and Formcreator 2.13.0-rc.1.
In the simplified support interface, the dashboard counters are empty.
I ran a forced update, as described in the 2.13.0-beta.1 release notes.
If I run:
REMOVE
FROM glpi_dashboards_items
WHERE dashboards_dashboards_id = (
SELECT identification
FROM glpi_dashboards_dashboards
WHERE key='plugin_formcreator_issue_counters'
);
DELETE FROM glpi_dashboards_dashboards WHERE key='plugin_formcreator_issue_counters';
the board disappears (the plugin is activated).
There are no error logs in either php-errors or sql-errors.
Screenshots

GLPI / Plugins (please complete the following information): Formcreator 2.13.0-rc.1
- GLPI version: 10.0.1
Hi
You misunderstood the release notes : the force upgrade is required only when you upgrade from a previous alpha or beta version.

You need to restore the backup of your DB then run a "regular" upgrade.
(from GLPI directory) bin/console glpi:plugin:formcreator install -f
Hello @btry , I did it first without running the forced update but it gave the same problem with the dashboard counters. Then I tried to run the forced update but the problem persists.
OK I will restore the database before updating and I will do as you indicate.
Thank you very much
You may want to anticipate a new failure, requiring investigation. To speedup tests on your side, have a backup of the database after upgrading to GLPI 10, but before upgrading to Formcreator 2.13.0.
I'm waiting for your feedback.
Hello,
Starting again from Glpi 9.57 and Formcreator 2.12.5 I upgraded to GLPI 10. After upgrading to GLPI 10, I updated the Formcreator plugin by running:
bin/console glpi:plugin:install formcreator -u glpi -f
The problem persists.

Open the developer tools of your browser, then refresh the page. In the netwkring tab of the developer tools find the HTTP request to dashboards.php. Show the payload

Hi I show you the payload:

It looks good. Now show the content of the "response" tab.

Some thing is wrong when computing the values of each counter.
Check in php-errors.log and sql-errors.log if you have some errors.
Hi, there are no errors in php-errors.log and sql-errors.log
Do I have to update to the alpha or beta version first before updating to the rc?
After reading the source code it seems that the your cards are not found when searching for them before computing their content. Despite the errro message is not 100% accurate (I would word it a different way) I think I'm on the right place because there is only 1 occurrence of this text in GLPI.
Run the following SQL query and show the result. Ensure the column gridstack_id is not truncated.
SELECT * FROM glpi_dashboards_items WHERE gridstack_id LIKE 'plugin_formcreator%'
Also, please get again the payload you shared earlier, and paste it as a text string. I need to compare it against the result og the sql query.
SQL

PAYLOAD { "action": "get_cards", "data": "{"dashboard":"plugin_formcreator_issue_counters","force":0,"embed":0,"d_cache_key":"da39a3ee5e6b4b0d3255bfef95601890afd80709","cards":[{"card_id":"plugin_formcreator_all_issues","force":0,"args":{"widgettype":"bigNumber","use_gradient":"0","point_labels":"0","color":"#ffd957","card_id":"plugin_formcreator_all_issues","cache_key":"dashboard_card_plugin_formcreator_issue_counters_ee07aeacdacdd28f4717f0d710145607ef83076f","gridstack_id":"plugin_formcreator_all_issues_2561d21d-af12-4030-977f-b7eccc2b1a23","apply_filters":{}},"c_cache_key":"dashboard_card_plugin_formcreator_issue_counters_ee07aeacdacdd28f4717f0d710145607ef83076f"},{"card_id":"plugin_formcreator_incoming_issues","force":0,"args":{"widgettype":"bigNumber","use_gradient":"0","point_labels":"0","color":"#6fd169","card_id":"plugin_formcreator_incoming_issues","cache_key":"dashboard_card_plugin_formcreator_issue_counters_e68e4e782c9c6d3b3ea8cff2538277d4af4ad3e7","gridstack_id":"plugin_formcreator_incoming_issues_a7aad3d9-b70f-47fd-ac2a-7c505b4bc01a","apply_filters":{}},"c_cache_key":"dashboard_card_plugin_formcreator_issue_counters_e68e4e782c9c6d3b3ea8cff2538277d4af4ad3e7"},{"card_id":"plugin_formcreator_assigned_issues","force":0,"args":{"widgettype":"bigNumber","use_gradient":"0","point_labels":"0","color":"#eaf4f7","card_id":"plugin_formcreator_assigned_issues","cache_key":"dashboard_card_plugin_formcreator_issue_counters_80cecfc6132fb1b9ff221cc80ae6b811bf3298fd","gridstack_id":"plugin_formcreator_assigned_issues_19ffe5fb-eede-4962-a6bb-a0a3916a4b30","apply_filters":{}},"c_cache_key":"dashboard_card_plugin_formcreator_issue_counters_80cecfc6132fb1b9ff221cc80ae6b811bf3298fd"},{"card_id":"plugin_formcreator_waiting_issues","force":0,"args":{"widgettype":"bigNumber","use_gradient":"0","point_labels":"0","color":"#ffcb7d","card_id":"plugin_formcreator_waiting_issues","cache_key":"dashboard_card_plugin_formcreator_issue_counters_ae2ba2e6fafc7a96cae25be05b48f1eb14504c4d","gridstack_id":"plugin_formcreator_waiting_issues_8ee2608b-96b2-4a5d-9f1f-0124c32f7675","apply_filters":{}},"c_cache_key":"dashboard_card_plugin_formcreator_issue_counters_ae2ba2e6fafc7a96cae25be05b48f1eb14504c4d"},{"card_id":"plugin_formcreator_validate_issues","force":0,"args":{"widgettype":"bigNumber","use_gradient":"0","point_labels":"0","color":"#6298d5","card_id":"plugin_formcreator_validate_issues","cache_key":"dashboard_card_plugin_formcreator_issue_counters_662fd630168307c5e33defbf5b50c7aaf460fd7a","gridstack_id":"plugin_formcreator_validate_issues_c314994f-15d8-44d7-91cf-0d9f116e5a1c","apply_filters":{}},"c_cache_key":"dashboard_card_plugin_formcreator_issue_counters_662fd630168307c5e33defbf5b50c7aaf460fd7a"},{"card_id":"plugin_formcreator_solved_issues","force":0,"args":{"widgettype":"bigNumber","use_gradient":"0","point_labels":"0","color":"#d7d7d7","card_id":"plugin_formcreator_solved_issues","cache_key":"dashboard_card_plugin_formcreator_issue_counters_82d981a0d795a71261027a5acb154789b2ff8adf","gridstack_id":"plugin_formcreator_solved_issues_b2e83ee2-6bf4-47d3-bc65-61ed5d05d65c","apply_filters":{}},"c_cache_key":"dashboard_card_plugin_formcreator_issue_counters_82d981a0d795a71261027a5acb154789b2ff8adf"},{"card_id":"plugin_formcreator_closed_issues","force":0,"args":{"widgettype":"bigNumber","use_gradient":"0","point_labels":"0","color":"#515151","card_id":"plugin_formcreator_closed_issues","cache_key":"dashboard_card_plugin_formcreator_issue_counters_be10ebbe38dc8ee73d4f359d5b25b3bdfcb5c37c","gridstack_id":"plugin_formcreator_closed_issues_01dc2b80-9fe8-47b1-8cfb-02c9eca63b82","apply_filters":{}},"c_cache_key":"dashboard_card_plugin_formcreator_issue_counters_be10ebbe38dc8ee73d4f359d5b25b3bdfcb5c37c"}]}" }
the relation between the payload and the DB looks good.
Try to reset the cache of GLPI (fomder files/_cacle), t ry to logout / clean the browser's cache then login again). I'm suspecting a caching issue.
Hi, delete the contents of the files/_cache directory?
Yes. It will be lazily recreated by GLPI.
ok i did it, but the problem persists. I have tried in three different environments with the same result.
Hi @btry
I have upgraded to beta 2 and the counters are showing. Then I have updated to rc1 and the counters are kept.
Upgrading directly from 2.12.5 to 2.13.0-rc.1 gives problems!
I'll test your scenario to see if I can reproduce as well.
Hi
I tested an upgrade from 2.12.5 to 2.13.0-rc.1 and I don't reproduce any issue with the dashboard.
Can you check if you have php errors or sql errors during the upgrade process ? You may run the upgrade of the plugin from CLI to easily get them.
Hello @btry ,
I think the problem was that you have to clean the plugin from the plugins view before updating. When I update a plugin I usually don't clean them first but I do it directly, by CLI or from the web interface, but in this case I had to clean it.
Do you mean claning a plugin when its folder has been removed, causing this type of display ?

Yes that's how it is.
You don't need to do this when you upgrade a plugin. GLPI allows you to clean a plugin when its code is missing in the plugins or marketplace directories. If the plugin is here, no matter the version, this options is not available.
Can you try again to upgrade without cleaning the plugin ?
Hi,
Ok, I'll do it as soon as I can and I'll let you know.
Thank you
Hello,
I have tried again without cleaning the plugin and the problem with the counters has happened again.

Once the 2.12.5 plugin has been cleaned, I have installed 2.13.0 for version 10, the counters already appear.
