-
Incident report
-
Resolution: Fixed
-
Major
-
2.4.3
-
All browsers (PHP issue)
If we create a trigger with at least two items in expression, the popup window will not show links to history of the items. (1.png).
I've tracked down the issue to tr_status.php, line 547, but the problem probably lies somewhere in setMenuPopup or getTrigger.
$description->setMenuPopup(CMenuPopupHelper::getTrigger($trigger, $triggerItems));
Checking the value of the array returned by getTrigger:
$descArray = CMenuPopupHelper::getTrigger($trigger, $triggerItems);
print_r($descArray);
Array (
[type] => trigger
[triggerid] => 15217
[items] => Array (
[1] => Array (
[name] => Procent wolnego miejsca na C:
[params] => Array (
[itemid] => 30666
[action] => showgraph
)
)
[0] => Array (
[name] => Wolne miejsce na C:
[params] => Array (
[itemid] => 30665
[action] => showgraph
)
)
)
[acknowledge] => [eventTime] => [configuration] => Array (
[hostid] => 10276
) [url] => [showEvents] => 1 )
The index of the nested array "index" starts at 1 - something futher down doesn't cope well with this.
A simple fix which fixed the issue:
$description = new CSpan($trigger['description'], 'link_menu'); $triggerPopupData = CMenuPopupHelper::getTrigger($trigger, $triggerItems); sort($triggerPopupData['items']); $description->setMenuPopup($triggerPopupData);
- duplicates
-
ZBX-9083 Links to history of items not appear in context menu of trigger name
-
- Closed
-