[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: |
|
| 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: 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:
Result: The above errors are observed in the widgets |