alleged errors from dashlat with filter
IP Address Management - CMDB - Ticketing - DNS and Zone Management
Brought to you by:
xtophe38
Hello Xtophe38,
am I right that dashlet “badge with filter” originates from teemip-core-ip-mgmt? I use it in a dashboard that automatically reloads every 60 s. And every 60 seconds I see this in error.log:
2025-02-25 17:14:18 | Error | 9 | Uncaught TypeError: array_merge(): Argument #1 must be of type array, string given in /var/www/html/mytestitop/core/metamodel.class.php:4193
Stack trace:
#0 /var/www/html/mytestitop/core/metamodel.class.php(4193): array_merge()
#1 /var/www/html/mytestitop/core/dbsearch.class.php(1115): MetaModel::PrepareQueryArguments()
#2 /var/www/html/mytestitop/core/dbobjectset.class.php(854): DBSearch->MakeSelectQuery()
#3 /var/www/html/mytestitop/sources/Controller/AjaxRenderController.php(704): DBObjectSet->Count()
#4 /var/www/html/mytestitop/pages/ajax.render.php(136): Combodo\iTop\Controller\AjaxRenderController::RefreshDashletCount()
#5 {main}
thrown | IssueLog |||
array (
'type' => 1,
'file' => '/var/www/html/mytestitop/core/metamodel.class.php',
'line' => 4193,
)
I made the observation that this error doesn’t occur anymore when I switch to a custom version of that dashboard and change the dashlet's OQL from
SELECT WorkOrder AS w
JOIN Team AS t ON w.team_id=t.id
JOIN lnkPersonToTeam AS l ON l.team_id=t.id
WHERE l.person_id =:current_contact_id
AND w.status != 'closed'
AND w.agent_id = 0
to
SELECT WorkOrder
Can you reproduce that?
Hello,
Yes, I've been able to reproduce your issue. It has been corrected in TeemIp 3.2.1 dated 2024-11-26 as said here on the wiki.
Cheers.
Hello,
teemip-core-ip-mgmt version 3.2.1 with release date 2024-11-26 was already installed. I also compared teemip-core-ip-mgmt-3.2.1-813.zip with teemip-core-ip-mgmt-3_2_1.zip from iTop Hub. They are identical.
Hum... I'll need to look at it then.
Hi,
I obviously went too fast on Feb the 25th ! I reviewed your case and identified a wrong variable initialisation in the "badge with filter" code.
This will be fixed in next TeemIp revision. In the meantime, you can get the fix by directly replacing this file from GitHub,
Thanks for the heads up and my apologies for the resolution delay.