formcreator icon indicating copy to clipboard operation
formcreator copied to clipboard

Opened requests doesn't appear on front page

Open ghost opened this issue 3 years ago • 8 comments

Opened requests doesn't appear on front page, and the number of requests or finnished request on the top of the page, doesn't appear too.

Only thing that shows is "N/A N/A N/A N/A"

Screenshots glpiformsbug

  • GLPI version: 9.5.5
  • list of all plugins: actualtime
    news
    archires
    behaviors
    formcreator
    fusioninventory
    order
    tag
    mod
    karastock
    moreticket
    dashboard
    tasklists
    webresources

ghost avatar Feb 01 '22 11:02 ghost

Hi

Which version of Formcreator. Was your instance upgraded before apparition of the problem ?

Also check sql-errors.log. there are very likely useful entries inside

btry avatar Feb 01 '22 11:02 btry

"formcreator Name: Form Creator Version: 2.12.4 State: Enabled"

Yes, it was upgraded.

Here I see another issue, could it be associated with my problem? marketplaceissue

ghost avatar Feb 01 '22 11:02 ghost

I believe that there is no write permission in the folder 'marketplace'. This is an other problem, very likely unrelated to your broken counters.

Check glpi/files/_log/sql-errors.log . There must be errors after displaying the counters.

btry avatar Feb 01 '22 11:02 btry

I found this warnings:

[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). [Warning] InnoDB: New log files created, LSN=45790 [Warning] InnoDB: Creating foreign key constraint system tables. [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: ****. [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. [Warning] CA certificate ca.pem is self signed. [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

I believe that there is no write permission in the folder 'marketplace'. This is an other problem, very likely unrelated to your broken counters.

Check glpi/files/_log/sql-errors.log . There must be errors after displaying the counters.

ghost avatar Feb 01 '22 14:02 ghost

When I inspect the front page, return this error from formcreator:

"The requested URL /css_compiled/css_styles.min.css.map was not found on this server."

ghost avatar Feb 02 '22 10:02 ghost

I found this warnings:

This will not break the counters.

"The requested URL /css_compiled/css_styles.min.css.map was not found on this server."

this is not related to your issue.

When a counter shows N/A, then there must be a SQL error. Is there really nothing in glpi/files/_log/sql-errors.log ? No entry with a malformed SQL query ?

btry avatar Feb 02 '22 14:02 btry

I don't know why, but this file "sql-errors.log" does not exist in this folder... Just a file "remove"...

nolog

ghost avatar Feb 02 '22 14:02 ghost

Hi

If the file does not exists, then your instance never had any problem with SQL queries, or the file has been deleted (and no subsequent SQL error ocurred).

Apply the following patch on Formcreator, reproduce the bug then view the last lines in php-errors.log.

diff --git a/inc/issue.class.php b/inc/issue.class.php
index 7008924b..709c411f 100644
--- a/inc/issue.class.php
+++ b/inc/issue.class.php
@@ -909,6 +909,7 @@ class PluginFormcreatorIssue extends CommonDBTM {
       if ($counter === null || $counter == 'incoming') {
          $searchIncoming = Search::getDatas(PluginFormcreatorIssue::class,
                                           self::getProcessingCriteria());
+         Toolbox::logError('total count incoming: ' . $searchIncoming['data']['totalcount']);
          if (isset($searchIncoming['data']['totalcount'])) {
             $status[Ticket::INCOMING] = $searchIncoming['data']['totalcount'];
          }

You should find a line containing something like the following. The number is the value which should show in the 1st counter.

total count incoming: 49  {"user":"2@my-computer"} 

If you don't have a number, then you probably have a PHP warning logged immediately before the line.

btry avatar Feb 03 '22 07:02 btry

Hi

Having no feedback and this issue being obsolete (version 2.12) I close.

btry avatar Apr 25 '23 12:04 btry