XF 2.1 One-click upgrades and add-on install/upgrade from ZIP files

And here we are, already at the penultimate entry in our "Have you seen...?" series for XF 2.1. If you haven't seen the previous entries about what's coming in XF 2.1, check them out here.

As ever, to ensure you're kept up to date, we strongly recommend giving that "Watch forum" link a... well... click, I guess... and make sure you enable email notifications if you haven't done so already 🙂
 
One-click XenForo upgrades

I'm sure you don't need me to tell you; doing upgrades can be a bit of a drag. Although we have always made the process as simple as possible, inevitably there are some common complaints about the process. Whether you're a total newbie to web-based applications or a seasoned pro, the process can be prone to human error and, aside from anything else, potentially take a long time.

Login to your customer area, download XenForo, open your FTP client, extract XenForo, upload the files, go to the install page, click to start the upgrade... That's just too many clicks.

xf21_oc_upgrade.gif

OK, it's kinda two clicks, but we do need to show a confirmation and any relevant warnings 😉
The above process which consists of downloading, extracting and copying the files - basically everything except the data import takes around 30 seconds. YMMV of course with various server side factors but regardless of how you cut it, this is going to be quicker than your current upgrade routine.
We will check for new updates automatically every 1-2 days or you can manually check for upgrades from Tools > Check for upgrades.

But wait... there's more!
 
One-click official XenForo add-on upgrades

Of course the new one-click goodness wouldn't quite be complete without also supporting similar functionality for XenForo Enhanced Search, Resource Manager and Media Gallery.

xf21_oc_upgrade_addon.gif

It takes a touch longer than that to run, but we've all seen the import add-on data process once or twice 😉
Of course many of you will have multiple XF add-ons, some of you even have all of them! You may have guessed from the initial confirmation page above that we actually support installing multiple XF add-ons at the same time!
 
Add-on install/upgrade from archive

The above new feature to upgrade official XF add-ons required us to have a system in place which allowed an add-on archive (or archives) to be downloaded from your customer area and then allow them to be extracted, copied and ultimately install them.

So why not just allow you to upload any add-on archive and install/upgrade it that way? Why not multiple add-ons? Why not :)

xf21_oc_upgrade_multiple_addons.gif

There is a new "Install / upgrade from archive" button on the Add-ons page in the Admin CP. Although above we've showed installing some official XF add-ons, this system will allow you to install any add-on by simply uploading the add-on ZIP file or a batch of ZIP files.

Once the "Add-on batch" has completed, you will be sent to a summary page. This will show you if any errors were encountered during the process:

Screenshot 2018-11-05 at 19.12.22.webp

As well as installing add-ons, you can upgrade add-ons in the same way. You can also upload an add-on version you already have installed which will trigger a "Rebuild" of the add-on. In this context the rebuild consists of copying over the add-on files and importing all of the add-on data (a bit like a "Rebuild master data" but for an add-on).
 
Configuration and requirements

With regards to XenForo upgrades, by default we will automatically check for stable updates (i.e. not beta/RC releases) but if early adoption and testing is your thing then you can enable receiving non-stable/pre-release upgrades under Options > Basic board information. Of course that is only recommended on test installations which have been properly backed up (we do not take backups for you).

localhost_21x_oc_admin.php_options_groups_basicBoard_ (1).webp

The upgrade checking for XF and official XF add-ons is enabled by default without any configuration because they originate from a trusted source. However, you may have reasons to disable one-click upgrades globally. These reasons could range from installations which pull code from a central version control system to having a secure configuration that would not allow the required paths to be writable.

Should you wish to disable one-click upgrades, you simply add the following to your src/config.php file:
PHP:
$config['enableOneClickUpgrade'] = false;
However, add-on installations/upgrades originate from downloadable ZIP files from third party developers, which may not be something you wish to be installed as easily. Of course the same requirements in terms of file permissions apply too. As such, the add-on installer is actually disabled by default. To enable install/upgrade from archive, you will need to add the following to your src/config.php file:
PHP:
$config['enableAddOnArchiveInstaller'] = true;

To make the process for both XF upgrades and add-on archive installs as resilient as possible, and to sanity check the environment to ensure that we wouldn't encounter any errors during the process (which would have the potential to leave your installation in an inconsistent state), we perform extensive checks to ensure that the target files/directories to be written/overwritten are writable by the PHP user. We go a step further with one-click XF upgrades to make sure that PHP is running as the same user who owns the files.

And, finally, in case it wasn't clear already, you will need to ensure that PHP is compiled with ZIP support which means that the ZipArchive class should be available.
 
License validation and error reporting

The one-click upgrade system works using a special API endpoint (unrelated to our REST API) which is authenticated by a special API key which is included in your XF 2.1 downloads. At the same time as checking for updates we check a few other things as well.

An example of some of the errors and warnings you might (but, hopefully won't 😉) see is below:

localhost_21x_admin.php.webp


localhost_21x_admin.php (1).webp


localhost_21x_admin.php (2).webp


localhost_21x_admin.php (3).webp

Clearly some of these issues are significant, and apart from the license expiry notification (which is purely informational) may potentially indicate license agreement breaches. That said, these are mostly to help in avoiding some of the genuine mistakes that customers sometimes make with their licenses, such as re-using the same downloads across different installations.
 
Great to have this in the core finally. Much needed improvement.

Do I understand it correctly that it checks only for upgrades of official XF releases? Not for addons?

FeelsBadMan for the ThemeHouse guys as they released recently the same thing but maybe they can tweak their addon as an enhancement suite (like check updates of addons).
 
Another winner feature.

hit-it-out-of-the-park.jpeg


2.1 is amazing!

Will the one click upgrade also overwrite all favicon and logo's?
Its a pet peeve of mine because I always forget to replace the files before I upload. And once the XF files are cached by Cloudlfare and browsers its hard to get rid of.
 
Will the one click upgrade also overwrite all favicon and logo's?
Its a pet peeve of mine because I always forget to replace the files before I upload. And once the XF files are cached by Cloudlfare and browsers its hard to get rid of.
Yep. But that's why we have style properties to control that. You're supposed to use the style properties to point to a custom image/icon that wouldn't be overwritten by the upgrades.
 
Do we get a second domain with our XF license ?

I run a test-site (not publicy accessible behind a http-auth) with an additional domain to do my (upgrade) tests. If I can't do these upgrades the same way as on prod (because license check would complain), testing becomes useless ...

Besides that a really cool feature that helps a lot administering (y)
 
Back
Top Bottom