[ZBX-27320] PHP and SQL related errors in SVG graph and Pie chart widgets if they listen for items from more than 1 widget Created: 2025 Dec 15  Updated: 2025 Dec 15  Resolved: 2025 Dec 15

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 7.0.23rc1, 7.4.7rc1, 8.0.0alpha2 (master)
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Sergejs Olonkins Assignee: Zabbix Development Team
Resolution: Duplicate Votes: 0
Labels: errors, graphwidget, piechartwidget
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: GIF File dataset_related_errors_pie_svg_graph_widgets.gif    

 Description   

Problem description: In case if SVG graph widget or Pie chart widget are listening to items from more than one widget, a PHP error (on SVG graph) or an SQL error (on Pie chart) are observer in these widgets:
In SVG ghraph widget:

array_flip(): Can only flip string and integer values, entry skipped [zabbix.php:17 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → Widgets\SvgGraph\Actions\WidgetView->doAction() → Widgets\SvgGraph\Includes\CSvgGraphHelper::get() → Widgets\SvgGraph\Includes\CSvgGraphHelper::getMetricsItems() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CItem->get() → dbConditionInt() → array_flip() → CConfigFile->{closure}() in conf/zabbix.conf.php:87]
array_flip(): Can only flip string and integer values, entry skipped [zabbix.php:17 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → Widgets\SvgGraph\Actions\WidgetView->doAction() → Widgets\SvgGraph\Includes\CSvgGraphHelper::get() → Widgets\SvgGraph\Includes\CSvgGraphHelper::getMetricsItems() → array_flip() → CConfigFile->{closure}() in conf/zabbix.conf.php:87]

In Pie chart widget:

pg_query(): Query failed: ERROR: invalid input syntax for type bigint: ""
LINE 1: ...rn.itemid WHERE i.flags IN (0,4) AND i.itemid IN ('',400695)...
^ [zabbix.php:17 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → Widgets\PieChart\Actions\WidgetView->doAction() → Widgets\PieChart\Actions\WidgetView->getData() → Widgets\PieChart\Actions\WidgetView::getItems() → Widgets\PieChart\Actions\WidgetView::getMetricsSingleItemDS() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CItem->get() → DBselect() → pg_query() → CConfigFile->{closure}() in conf/zabbix.conf.php:87]
Error in query [SELECT i.itemid,i.hostid,i.history,i.trends,i.units,i.value_type,COALESCE(irn.name_resolved,'') AS name_resolved FROM items i LEFT JOIN item_rtname irn ON i.itemid=irn.itemid WHERE i.flags IN (0,4) AND i.itemid IN ('',400695) AND i.value_type IN (0,3) LIMIT 50] [ERROR: invalid input syntax for type bigint: ""
LINE 1: ...rn.itemid WHERE i.flags IN (0,4) AND i.itemid IN ('',400695)...
^] [zabbix.php:17 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → Widgets\PieChart\Actions\WidgetView->doAction() → Widgets\PieChart\Actions\WidgetView->getData() → Widgets\PieChart\Actions\WidgetView::getItems() → Widgets\PieChart\Actions\WidgetView::getMetricsSingleItemDS() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CItem->get() → DBselect() → trigger_error() → CConfigFile->{closure}() in conf/zabbix.conf.php:87]

Steps to reproduce:

  1. Create a dashboard
  2. Create a honeycomb widget and an Item history widget on the same page
  3. Add an SVG graph widget with two data sets to the same page:
    1. The first dataset listens for items from the Honeycomb widget
    2. The second dataset listens for items from Item history widget
  4. Add a Pie chart widget with to data sets to the same page:
    1. The first dataset listens for items from the Honeycomb widget
    2. The second dataset listens for items from Item history widget
  5. Save dashboard configuration
  6. Open dashboard in view mode

Result: The above errors are observed in the widgets
Expected: No errors should be observed in the widgets

Example:


Generated at Wed Jan 07 13:41:49 EET 2026 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.