Jump to content

Support Manager Upgrade Bug Blesta 4.3 - How to resolve


Paul

Recommended Posts

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.
Link to comment
Share on other sites

  • Paul pinned this topic
  • Paul unpinned this topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...