-
Problem report
-
Resolution: Fixed
-
Trivial
-
5.0.0alpha1
-
Sprint 59 (Dec 2019), Sprint 60 (Jan 2020)
-
0.5
Steps to reproduce:
- Navigate to Administration -> Media types;
- Press "Test" for anyone of listed media types;
- Observe test popup appears;
- Click on the "Test" button. See error message telling that mandatory fields are left empty.
- Press "Test" button again without fixing error.
Result:
Error message for "Email" media type:
Undefined index: sendto [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerPopupMediatypeTestSend->checkInput() → CControllerPopupMediatypeTestSend->validateMediaType() → CController->getInput() → CConfigFile->{closure}() in conf/zabbix.conf.php:131] Invalid email address "".
Error message for "SMS" media type:
Undefined index: sendto [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerPopupMediatypeTestSend->doAction() → CController->getInput() → CConfigFile->{closure}() in conf/zabbix.conf.php:131] Undefined index: subject [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerPopupMediatypeTestSend->doAction() → CController->getInput() → CConfigFile->{closure}() in conf/zabbix.conf.php:131] Undefined index: message [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerPopupMediatypeTestSend->doAction() → CController->getInput() → CConfigFile->{closure}() in conf/zabbix.conf.php:131] Connection to Zabbix server "localhost" refused. Possible reasons: 1. Incorrect server IP/DNS in the "zabbix.conf.php"; 2. Security environment (for example, SELinux) is blocking the connection; 3. Zabbix server daemon not running; 4. Firewall is blocking TCP connection.Connection refused
There is also some inconsistency involved compared with versions 4.2 and 4.4. In previous versions, validator catched such invalid requests at validator method and didn't allowed to make connection to server unless all mandatory fields are filled. Now, as it is visible in error message for "SMS" media type, frontend tried to connect to Zabbix server. It shouldn't do that since input values are invalid.
Please also look why input fields are left disabled after error appears. "Test" button is enabled but input fields are still inaccessible and user cannot fix the problem. This might be a core problem since javascript fails trying to collect values from disabled fields.