-
Problem report
-
Resolution: Fixed
-
Trivial
-
6.0.39rc1, 7.0.11rc1, 7.2.5rc1, 7.4.0beta1
-
Prev.Sprint
-
1
Steps to reproduce:
- Edit any existing map
- Check "Advanced labels"
- Select custom label for any of "Advanced labels" options
- 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. - 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.