Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-3791

Support Manager: Add support for emojis (4 byte characters) to support summary and replies

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.11.0
    • Fix Version/s: 5.0.0-b1
    • Component/s: Plugins
    • Labels:
      None

      Description

      The collation for support_replies.details is utf8_unicode_ci which supports 3 byte characters. Emojis are 4 byte characters and are better represented by utf8mb4_unicode_ci. However, updating the collation in itself does not allow the storage of emoji's in support replies or summaries, and an error along the following lines is written when trying to do so:

      ==> general-error-2020-07-31.log <==
      [2020-07-31 22:02:05] general.ERROR: PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x8D\x84' for column 'details' at row 1 in /home/blestau/public_html/4110/vendors/minphp/db/src/PdoConnection.php:196 Stack trace: #0 /home/blestau/public_html/4110/vendors/minphp/db/src/PdoConnection.php(196): PDOStatement->execute(Array) #1 /home/blestau/public_html/4110/vendors/minphp/record/src/Record.php(275): Minphp\Db\PdoConnection->query('INSERT INTO `su...', Array) #2 /home/blestau/public_html/4110/plugins/support_manager/models/support_manager_tickets.php(557): Minphp\Record\Record->insert('support_replies', Array, Array) #3 /home/blestau/public_html/4110/plugins/support_manager/controllers/admin_tickets.php(494): SupportManagerTickets->addReply('4', Array, Array) #4 /home/blestau/public_html/4110/vendors/minphp/bridge/src/Lib/Dispatcher.php(142): AdminTickets->reply() #5 /home/blestau/public_html/4110/index.php(21): Dispatcher::dispatch('/4110/admin/plu...') #6

      {main}

      We should investigate what is necessary to get this to work and allow emoji's for support tickets. The current situation is not ideal, because if a 4 byte character is submitted it will always result in an error. Better to eliminate the error by allowing the characters.

        Activity

        admin Paul Phillips created issue -
        admin Paul Phillips made changes -
        Field Original Value New Value
        Description The collation for support_replies.details is utf8_unicode_ci which supports 3 byte characters. Emojis are 4 byte characters and are better represented by untfmb4_unicode_ci. However, updating the collation in itself does not allow the storage of emoji's in support replies or summaries, and an error along the following lines is written when trying to do so:

        ==> general-error-2020-07-31.log <==
        [2020-07-31 22:02:05] general.ERROR: PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x8D\x84' for column 'details' at row 1 in /home/blestau/public_html/4110/vendors/minphp/db/src/PdoConnection.php:196 Stack trace: #0 /home/blestau/public_html/4110/vendors/minphp/db/src/PdoConnection.php(196): PDOStatement->execute(Array) #1 /home/blestau/public_html/4110/vendors/minphp/record/src/Record.php(275): Minphp\Db\PdoConnection->query('INSERT INTO `su...', Array) #2 /home/blestau/public_html/4110/plugins/support_manager/models/support_manager_tickets.php(557): Minphp\Record\Record->insert('support_replies', Array, Array) #3 /home/blestau/public_html/4110/plugins/support_manager/controllers/admin_tickets.php(494): SupportManagerTickets->addReply('4', Array, Array) #4 /home/blestau/public_html/4110/vendors/minphp/bridge/src/Lib/Dispatcher.php(142): AdminTickets->reply() #5 /home/blestau/public_html/4110/index.php(21): Dispatcher::dispatch('/4110/admin/plu...') #6 {main}

        We should investigate what is necessary to get this to work and allow emoji's for support tickets. The current situation is not ideal, because if a 4 byte character is submitted it will always result in an error. Better to eliminate the error by allowing the characters.
        The collation for support_replies.details is utf8_unicode_ci which supports 3 byte characters. Emojis are 4 byte characters and are better represented by utf8mb4_unicode_ci. However, updating the collation in itself does not allow the storage of emoji's in support replies or summaries, and an error along the following lines is written when trying to do so:

        ==> general-error-2020-07-31.log <==
        [2020-07-31 22:02:05] general.ERROR: PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x8D\x84' for column 'details' at row 1 in /home/blestau/public_html/4110/vendors/minphp/db/src/PdoConnection.php:196 Stack trace: #0 /home/blestau/public_html/4110/vendors/minphp/db/src/PdoConnection.php(196): PDOStatement->execute(Array) #1 /home/blestau/public_html/4110/vendors/minphp/record/src/Record.php(275): Minphp\Db\PdoConnection->query('INSERT INTO `su...', Array) #2 /home/blestau/public_html/4110/plugins/support_manager/models/support_manager_tickets.php(557): Minphp\Record\Record->insert('support_replies', Array, Array) #3 /home/blestau/public_html/4110/plugins/support_manager/controllers/admin_tickets.php(494): SupportManagerTickets->addReply('4', Array, Array) #4 /home/blestau/public_html/4110/vendors/minphp/bridge/src/Lib/Dispatcher.php(142): AdminTickets->reply() #5 /home/blestau/public_html/4110/index.php(21): Dispatcher::dispatch('/4110/admin/plu...') #6 {main}

        We should investigate what is necessary to get this to work and allow emoji's for support tickets. The current situation is not ideal, because if a 4 byte character is submitted it will always result in an error. Better to eliminate the error by allowing the characters.
        jonathan Jonathan Reissmueller made changes -
        Fix Version/s 5.0.0-b1 [ 11107 ]
        Fix Version/s Short Term [ 10800 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.0.0 Sprint 1 [ 118 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked lower
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Assignee Jonathan Reissmueller [ jonathan ]
        Automated transition triggered when Jonathan Reissmueller created a branch in Stash -
        Status Open [ 1 ] In Progress [ 3 ]
        jonathan Jonathan Reissmueller made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 3 hours, 22 minutes [ 12120 ]
        Worklog Id 14272 [ 14272 ]
        jonathan Jonathan Reissmueller made changes -
        Time Spent 3 hours, 22 minutes [ 12120 ] 4 hours, 22 minutes [ 15720 ]
        Worklog Id 14272 [ 14272 ]
        Automated transition triggered when Jonathan Reissmueller created pull request #991 in Stash -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        abdy Abdy Franco made changes -
        Time Spent 4 hours, 22 minutes [ 15720 ] 5 hours, 6 minutes [ 18360 ]
        Worklog Id 14277 [ 14277 ]
        abdy Abdy Franco made changes -
        Time Spent 5 hours, 6 minutes [ 18360 ] 5 hours, 13 minutes [ 18780 ]
        Worklog Id 14281 [ 14281 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.0.0 Sprint 1 [ 118 ] 5.0.0 Sprint 2 [ 119 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked lower
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked lower
        Automated transition triggered when Jonathan Reissmueller merged pull request #991 in Stash -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            jonathan Jonathan Reissmueller
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              23/Dec/20

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 5 hours, 13 minutes
              5h 13m

                Agile