fusioninventory-for-glpi
fusioninventory-for-glpi copied to clipboard
9.2+1.0-9.3+1.1 (GLPI 9.2.3-9.3.2): Display/Usability Issue: "Tasks - Monitoring/Logs" empty - data in glpi_plugin_fusioninventory_taskjoblogs
In reference to #2600
- Job executions within plugins/fusioninventory/front/task.form.php working as expected.
- plugins/fusioninventory/front/taskjob.php is empty
it's due to this new condition
https://github.com/fusioninventory/fusioninventory-for-glpi/blob/9107173e31f84df31bc21065a8f548933739fd47/inc/task.class.php#L959
introduce by this PR -> https://github.com/fusioninventory/fusioninventory-for-glpi/pull/2527
Now, if we request a task job log without a task ID, the plugin returns an empty array
you can modify the condition to initialize the variable $asks_list with empty string instead of returning an array
Pay attention to the memory that can cause a fatal mistake on Allowed memory size
Best regards
could you please explain us how to initialize the variable $tasks_list with empty string in /inc/task.class.php ?
line 959, replace the return statement by $task_list = '';
Pay attention to the memory that can cause a fatal mistake on Allowed memory size
Because FI try to display all log
Cordialy
Hello I have replace the line return ['tasks' => $logs, 'agents' => $agents]; with $task_list = ''; and now each second in php_error.log: [2019-07-23 09:11:24] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /bustools/glpi/inc/toolbox.class.php line 659 *** PHP Notice(8): Undefined variable: tasks_list Backtrace : plugins/fusioninventory/inc/task.class.php:990 plugins/fusioninventory/inc/task.class.php:1426 PluginFusioninventoryTask->getJoblogs() plugins/fusioninventory/ajax/taskjob_logs.php:58 PluginFusioninventoryTask->ajaxGetJobLogs()
Could you please help us ?
I have the same problem in fress-install glpi 9.4.4 - no results on monitoring/logs page even mysql table glpi_plugin_fusioninventory_taskjoblogs is not empty. I've changed $task_list to empty and I can see taksk on monitoring/log page. So, where the problem lays?
glpi_plugin_fusioninventory_taskjobstates if empty?
no, it's not empty
Hello, I have the same problem. Global tasklog is blank screen, but display in each task work. (only timer dropbox don't display actual delay). PM
Still the same problem on GLPI 9.5.1 and FusionInventory 9.5.0+1.0
Hello, I have the same problem with 9.5+3.0 Have-you any solution ?
Hi, I'm still having the issue on GLPI 9.5.7 and FusionInventory 9.5+3.0. Applying the following patch (based on stonebuzz suggestion) :
--- /tmp/fusioninventory/inc/task.class.php 2021-03-21 19:46:06.000000000 +0000
+++ /srv/glpi/public/plugins/fusioninventory/inc/task.class.php 2022-03-07 13:00:51.736646872 +0000
@@ -958,7 +958,8 @@
$tasks_list = "AND task.`id` IN ('".implode("', '", $task_ids)."')";
} else {
// Not task identifiers provided
- return ['tasks' => $logs, 'agents' => $agents];
+ //return ['tasks' => $logs, 'agents' => $agents];
+ $tasks_list = "";
}
// Restrict by IP to prevent display tasks in another entity use not have right
Almost works, but it triggers the following JS exception :
Uncaught TypeError: "job_93_PluginFusioninventoryDeployPackage_53_0" is not a non-null object
cache https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
set https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
access https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
queue https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
queue https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
each https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:14
each https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:14
queue https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
delay https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
update_logs https://glpi.cemea.org/plugins/fusioninventory/js/taskjobs.js?v=9.5+3.0:819
success https://glpi.cemea.org/plugins/fusioninventory/js/taskjobs.js?v=9.5+3.0:1142
setTimeout handler*success https://glpi.cemea.org/plugins/fusioninventory/js/taskjobs.js?v=9.5+3.0:1141
l https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
fireWith https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
T https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
e https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
send https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
ajax https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
ajax https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7 line 25 > eval:304
get_logs https://glpi.cemea.org/plugins/fusioninventory/js/taskjobs.js?v=9.5+3.0:1132
queue_refresh_logs https://glpi.cemea.org/plugins/fusioninventory/js/taskjobs.js?v=9.5+3.0:1229
queue_refresh_logs https://glpi.cemea.org/plugins/fusioninventory/js/taskjobs.js?v=9.5+3.0:1231
update_logs_timeout https://glpi.cemea.org/plugins/fusioninventory/js/taskjobs.js?v=9.5+3.0:1206
<anonymous> https://glpi.cemea.org/plugins/fusioninventory/front/taskjob.php:843
u https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
f https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
setTimeout handler*Deferred/then/o/< https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
l https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
fireWith https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
fire https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
l https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
fireWith https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
ready https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
V https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
EventListener.handleEvent* https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:25
<anonymous> https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:14
<anonymous> https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:14
i https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:1
<anonymous> https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:1
i https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:1
<anonymous> https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:1
<anonymous> https://glpi.cemea.org/public/lib/base.min.js?v=9.5.7:1
Updating fusioninventory/js/taskjobs.js with the following patch :
--- fusioninventory/js/taskjobs.js 2021-03-21 19:46:06.000000000 +0000
+++ /srv/glpi/public/plugins/fusioninventory/js/taskjobs.js 2022-03-07 14:51:17.936614063 +0000
@@ -816,7 +816,7 @@
});
}
- $(Object.keys(taskjobs.charts)).delay(500).each(function(i,v) {
+ $(Object.keys(taskjobs.charts)).each(function(i,v) {
taskjobs.update_progressbar(taskjobs.charts[v]);
});
Resolve this issue and allow front/taskjob.php
to properly display all logs without issue.
However, it's a bit of a hack, so a proper fix would be great :)
same problem here
GLPI 9.5.7 FusionInventory 9.5+4.1