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

The "Acknowledge" action silently fails if the comment textarea contains more than 255 chars

    XMLWordPrintable

Details

    • Incident report
    • Status: Closed
    • Trivial
    • Resolution: Duplicate
    • 2.0.2
    • None
    • Frontend (F)
    • Firefox, Ubuntu 12.04

    Description

      If a user on the zabbix/acknow.php page enters more than 255 characters into the Message comment field textarea, when "Save and return" is clicked, the acknowledge is dropped and the comment is lost. No error message is given, and it's not clear that the acknowledge didn't get processed. The 255 character limit appears to be due to the column size of the database table 'acknowleges'.

      The following patch constrains the comment textarea to 255 characters, which will prevent the problem.

      diff /var/www/zabbix/acknow.php ~/zabbix-2.0.2/frontends/php/acknow.php
      208c208
      < $frmMsg->addRow(_('Message'), new CTextArea('message', '', ZBX_TEXTAREA_STANDARD_ROWS, ZBX_TEXTAREA_BIG_WIDTH, false, 255));

      > $frmMsg->addRow(_('Message'), new CTextArea('message', '', ZBX_TEXTAREA_STANDARD_ROWS, ZBX_TEXTAREA_BIG_WIDTH));

      diff /var/www/zabbix/include/classes/class.ctextarea.php ~/zabbix-2.0.2/frontends/php/include/classes/class.ctextarea.php
      31c31
      < public function __construct($name = 'textarea', $value = '', $rows = ZBX_TEXTAREA_STANDARD_ROWS, $width = ZBX_TEXTAREA_STANDARD_WIDTH, $readonly = false, $maxlength='') {

      > public function __construct($name = 'textarea', $value = '', $rows = ZBX_TEXTAREA_STANDARD_ROWS, $width = ZBX_TEXTAREA_STANDARD_WIDTH, $readonly = false) {
      37d36
      < $this->attr('maxlength', $maxlength);

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kester Kester Allen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: