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

Support Manager: Editing a department fails when the department has no custom fields

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.4.0
    • Fix Version/s: 5.4.1
    • Component/s: Plugins
    • Labels:
      None

      Description

      On 5.4.0, to reproduce:

      1. Create a Support Department without any custom fields.
      2. Edit the department and change anything, but do not create any custom fields, and save.

      The data appears to be saved, but an error is logged and a white screen occurs. If the department has any custom fields, there is no error.

      [2022-05-11T17:28:45.114085+00:00] general.ERROR: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND `support_department_fields`.`department_id`='1'' at line 1 in /home/blestau/public_html/530b1/vendors/minphp/db/src/PdoConnection.php:196 Stack trace: #0 /home/blestau/public_html/530b1/vendors/minphp/db/src/PdoConnection.php(196): PDOStatement->execute(Array) #1 /home/blestau/public_html/530b1/vendors/minphp/record/src/Record.php(345): Minphp\Db\PdoConnection->query('DELETE `support...', Array) #2 /home/blestau/public_html/530b1/plugins/support_manager/models/support_manager_departments.php(263): Minphp\Record\Record->delete(Array) #3 /home/blestau/public_html/530b1/plugins/support_manager/models/support_manager_departments.php(196): SupportManagerDepartments->editFields(1, Array) #4 /home/blestau/public_html/530b1/plugins/support_manager/controllers/admin_departments.php(260): SupportManagerDepartments->edit('1', Array) #5 /home/blestau/public_html/530b1/vendors/minphp/bridge/src/Lib/Dispatcher.php(142): AdminDepartments->edit() #6 /home/blestau/public_html/530b1/index.php(21): Dispatcher::dispatch('/530b1/admin/pl...') #7

      {main}

        Activity

        admin Paul Phillips created issue -
        admin Paul Phillips made changes -
        Field Original Value New Value
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.5.0 Sprint 3 [ 155 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        abdy Abdy Franco made changes -
        Assignee Abdy Franco [ abdy ]
        abdy Abdy Franco made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        abdy Abdy Franco made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 1 hour, 43 minutes [ 6180 ]
        Worklog Id 15724 [ 15724 ]
        abdy Abdy Franco made changes -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        jonathan Jonathan Reissmueller made changes -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              24/May/22

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 hour, 43 minutes
              1h 43m

                Agile