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

Runtime error appears, if adding label with more than 255 characters in Map->Properties->Advanced labels->Custom label

XMLWordPrintable

    • Sprint candidates

      Steps to reproduce:

      1. Edit any existing map
      2. Check "Advanced labels"
      3. Select custom label for any of "Advanced labels" options
      4. Add text with more than 255 characters, for example:
        abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ !"§ $%& /() =?* '<> #|; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ !"§ $%& /() =?* '<> #|; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz.
        
      5. Update the map

      Result:
      Blank screen is displayed.
      See video:

      Runtime error:

      DBException: Value "abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ !"§ $%& /() =?* '<> #|; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz ABC DEF GHI JKL MNO PQRS TUV WXYZ !"§ $%& /() =?* '<> #|; ²³~ @`´ ©«» ¤¼× {} abc def ghi jkl mno pqrs tuv wxyz." is too long for field "label_string_host" - 256 characters. Allowed length is 255 characters. in /home/zabbix/workspace/master/ui/include/classes/db/DB.php:70
      Stack trace:
      #0 /home/zabbix/workspace/master/ui/include/classes/db/DB.php(351): DB::exception()
      #1 /home/zabbix/workspace/master/ui/include/classes/db/DB.php(566): DB::checkValueTypes()
      #2 /home/zabbix/workspace/master/ui/include/classes/api/services/CMap.php(2148): DB::update()
      #3 /home/zabbix/workspace/master/ui/include/classes/api/clients/CLocalApiClient.php(117): CMap->update()
      #4 /home/zabbix/workspace/master/ui/include/classes/api/wrappers/CApiWrapper.php(101): CLocalApiClient->callMethod()
      #5 /home/zabbix/workspace/master/ui/include/classes/api/wrappers/CApiWrapper.php(89): CApiWrapper->callClientMethod()
      #6 /home/zabbix/workspace/master/ui/include/classes/api/wrappers/CFrontendApiWrapper.php(58): CApiWrapper->callMethod()
      #7 /home/zabbix/workspace/master/ui/include/classes/api/wrappers/CApiWrapper.php(77): CFrontendApiWrapper->callMethod()
      #8 /home/zabbix/workspace/master/ui/sysmaps.php(181): CApiWrapper->__call()
      #9 {main}

      Expected:
      Validation should be present, user should see correct error message on the frontend or should not be possible to add text longer than 255 char.

            zabbix.dev Zabbix Development Team
            ngogolevs Nikita Gogolevs
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: