Jump to content

Support Manager Upgrade Bug Blesta 4.3 - How to resolve


Recommended Posts

Posted

If you upgraded to Blesta 4.3 and got or are getting the following error:

Quote

'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'date_updated' in 'field list'' in /path/to/blesta/vendors/minphp/db/src/PdoConnection.php:196

You may be able to upgrade to the support manager included in Blesta 4.4. If you are running Blesta 4.3.2, you can also make the following changes. (BACKUP FIRST).

  • Edit /plugins/support_manager/support_manager_plugin.php
  • Find the following code:
                // Add a 'date_updated' column to the 'support_tickets' table
                $this->Record->query('ALTER TABLE `support_tickets` ADD `date_updated` DATETIME NOT NULL
                    AFTER `date_added`;
                ');
  • Change to:
                // Add a 'date_updated' column to the 'support_tickets' table
                $this->Record->query('ALTER TABLE `support_tickets` ADD `date_updated` DATETIME NULL DEFAULT NULL
                    AFTER `date_added`;
                ');
  • THEN, look for the following:
                // Set date_updated to date_added for all tickets
                $this->Record->set('support_tickets.date_updated', 'support_tickets.date_added', false)->update('support_tickets');
  • AFTER the above, add the following code:
                // Make support_tickets.date_updated not null by default
                $this->Record->query('ALTER TABLE `support_tickets`
                    CHANGE `date_updated` `date_updated` DATETIME NOT NULL;
                ');
  • Then, go to Settings > Company > Plugins and click the Upgrade button for the Support Manager.
  • Paul pinned this topic
  • Paul unpinned this topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...