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

Error when importing zabbix screen

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Trivial Trivial
    • None
    • 4.0.30
    • Frontend (F)
    • None

      Steps to reproduce:

      1. Importing new screen with ansible

      It seems with the latest change on DB.php (https://github.com/zabbix/zabbix/commit/40bb7aa69bf18c100c9db161fca21a4757f2a5a9#diff-7b852ee5eea1d341f631e6081241cded9a8644b43a69640f24aff27f3aa2f02cR431-R433) will change the value of $values['name'] to NULL.

      I didn't get any relation between referenced $value and value of $values. But the following statement will fix the issue (by refactoring ternary if).

       

      if(array_key_exists('default', $table_schema['fields'][$field])) {
         $value = $table_schema['fields'][$field]['default']; 
      }
      

       

      Result:

      Field \"name\" cannot be set to NULL.
      Expected:
      Import without any error

            zabbix.support Zabbix Support Team
            hosseinzolfi Hossein Zolfi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: