Upgrading to 2.2 from 2.1

SupportPal 2.2.0 is a major update, adding mutli-lingual functionality and time tracking support, amongst many other new features and improvements.

Contents

Estimated Upgrade Time: Less Than 1 Hour.

What's New?

View the 2.2 Release Notes for the new features and improvements in this series.

New Requirements

Please make sure your server meets the below new system requirements before beginning the upgrade:

Upgrading Database

Several indexes have been added to the database in order to improve the performance of some SQL queries. Due to this change, the upgrade script may be slow so we recommend to read through the below before continuing:

Disable Server-side Timeouts

We recommend that you disable server-side timeouts within your web server, PHP and MySQL configurations before beginning the SupportPal 2.2.0 in-browser upgrade process.

Please ask your server administrator or hosting provider for more details on what settings are appropriate to disable for your server environment. We suggest the following PHP configuration:

Manual Upgrade

If you can't disable server-side timeouts or prefer to manually execute SQL queries, below we have provided an SQL file that you can run against the database. The SQL file contains all of the database migrations that may take significant time to execute, to make use of the file please follow the below steps:

  1. Upload and extract the 2.2.0 zip file
  2. Download and manually run the following SQL script against your database:
    2.2.0_migrations.sql
  3. Proceed with the usual SupportPal upgrade by browsing to http://support.yourdomain.com/upgrade

Template Changes

This release has a large number of breaking template changes to both the frontend and operator panel templates. We always recommend to apply all the template changes (frontend, operator panel) to your custom templates to ensure that they continue to function properly, however below is a list of breaking changes (linked to our resources repository with the diff) where updating the template is essential.

Frontend

Operator Panel

The operator panel requires copying all changes as the majority of them have been made to support multi-lingual features.

Email Template Changes

The upgrader will attempt to automatically update the email templates if they've not been modified, but this section is still relevant if it mentions it was unable to update or you've added a translated version of a template listed below.

A new setting has been introduced to only send attachments in emails that are above the set size to avoid potential memory issues, the default value for this is '10M'. As part of the change, we have updated our default email templates to include links to download attachments in case they are not attached in the email.

Below is a list of default email templates affected, split by section, and the new code that needs to be copied in to them. You will also need to apply the changes to your own custom email templates depending on where they are used and who they are targeted to. The email template name has been given with the ID in brackets, the ID should be seen in the URL when you go to edit it.

User

View the HTML source of the template (click <>, the first icon, in the editor toolbar) and insert the following code on a new line after {{ message.text }}.


    {% if not message.attachments.isEmpty() %}
        <div style="padding-top:15px;">
            <span style="color:#999;font-size:12px;text-transform:uppercase;">Attachments</span>
            {% for attachment in message.attachments %}
                <div style="background:#f5f5f5;margin-top: 2px;padding:5px 12px;">
                    <a href='{{ attachment.frontend_url }}'>{{ attachment.original_name }}</a>
                    &nbsp;<span style="color:#999;">({{ attachment.upload.size }})</span>
                </div>
            {% endfor %}
        </div>
    {% endif %}

Operator

View the HTML source of the template (click <>, the first icon, in the editor toolbar) and insert the following code on a new line after {{ message.text }}. There will be two cases of this in all of the templates.


    {% if not message.attachments.isEmpty() %}
        <div style="padding-top:15px;">
            <span style="color:#999;font-size:12px;text-transform:uppercase;">Attachments</span>
            {% for attachment in message.attachments %}
                <div style="background:#f5f5f5;margin-top: 2px;padding:5px 12px;">
                    <a href='{{ attachment.operator_url }}'>{{ attachment.original_name }}</a>
                    &nbsp;<span style="color:#999;">({{ attachment.upload.size }})</span>
                </div>
            {% endfor %}
        </div>
    {% endif %}

Plugin Changes

Prior to SupportPal 2.2 any plugin route files were protected by operator authentication and the permissions system. In 2.2 you can now use specific filenames, to associate the routes within the file with a specific middleware group:

Filename Attributes
frontend.php Protected by frontend authentication, and maintenance warning system
operator.php Protected by operator authentication
settings.php, plugin.php, widget.php Protected by operator authentication and plugin / widget permissions.

Any file within the Routes directory that does not match the above list does not have any attributes imposed i.e. routes are unauthenticated, outside of the permissions system and so on.

Configuration File Changes

The following configuration items have moved files; if you're currently using or have modified any of these please update the new configuration file to avoid losing the change.

Other Important Changes