Menu

#158 alleged errors from dashlat with filter

3.2.1 Module
closed
Xtophe38
None
2025-06-23
2025-02-25
eric24V
No

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?

Discussion

  • Xtophe38

    Xtophe38 - 2025-02-25

    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.

     
  • eric24V

    eric24V - 2025-02-26

    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.

     
  • Xtophe38

    Xtophe38 - 2025-02-26
    • assigned_to: Xtophe38
     
  • Xtophe38

    Xtophe38 - 2025-02-26

    Hum... I'll need to look at it then.

     
  • Xtophe38

    Xtophe38 - 2025-04-09

    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.

     
  • Xtophe38

    Xtophe38 - 2025-06-23
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.