Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-17129

Repeated media type test generates undefined index error

XMLWordPrintable

    • Sprint 59 (Dec 2019), Sprint 60 (Jan 2020)
    • 0.5

      Steps to reproduce:

      1. Navigate to Administration -> Media types;
      2. Press "Test" for anyone of listed media types;
      3. Observe test popup appears;
      4. Click on the "Test" button. See error message telling that mandatory fields are left empty.
      5. 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.

            talbergs Mārtiņš Tālbergs (Inactive)
            Miks.Kronkalns Miks Kronkalns
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: