Guide  XenForo add-on upgrade failed or stuck: how to finish it without losing data

Gwendal

Developer
Moderator
Customer
Verified license
18 products BoardGameHub Classified Drafts Emporium Emporium Client GameHub GroupFlair Immersive Messenger Journey Level Plans Teams Watch Party XenCard XenPing XenSpotlight XenStaff XenStreak
An add-on upgrade that stops halfway looks scary: an error box, an add-on still showing its old version, maybe an entry in the server error log. In almost every case nothing is lost. XenForo upgrades add-ons in steps, and a step that fails stops before it writes anything. This guide covers the cases we see most often in our support tickets, in the order you should check them.

It applies to any XenForo 2.3 add-on, ours or not.

1. "Install/upgrade from archive" is missing or refuses the ZIP​

The archive installer is off by default. If the button is missing, or XenForo says installing from archives must be explicitly enabled, add this line to src/config.php (over FTP or SFTP):

PHP:
$config['enableAddOnArchiveInstaller'] = true;

Two other requirements can block it:
  • ZipArchive: PHP needs its zip extension. If XenForo says ZipArchive support is missing, ask your host to enable it.
  • Writable folders: the board root, js, src/addons and styles must be writable by PHP. If they are not, XenForo lists the ones it cannot write to. Fix the permissions, or upload the files over FTP instead (see step 4).

2. An error right after the upgrade, then nothing​

Typical entries: Call to undefined method ..., or a callback reported as invalid, logged a few seconds after you installed the archive.

What happens: PHP keeps compiled copies of the files it runs (OPcache). XenForo asks PHP to reset that cache after copying the new files, but many shared hosts do not allow it. For a minute or two, PHP can then run a mix of old and new files: an old file calls a method that only exists in the new version, or the other way round. As soon as the cache refreshes, the new code takes over.

What to do:
  1. Wait two minutes.
  2. Open Admin CP > Add-ons. If the add-on is listed under Upgradeable add-ons with an Upgrade button, click it. The files are already in place, so the upgrade simply runs again.
  3. If it shows its new version and no Upgrade button, you are done. You can delete the error entry from Admin CP > Logs > Server error log.

3. The add-on shows "Action pending"​

That red label means an install, upgrade or rebuild started and did not finish, often because the browser tab was closed or the request timed out. While it is shown, XenForo switches off parts of that add-on and keeps some errors quiet, so do not leave it that way.

Click Upgrade again if the button is there. If the step fails again, note the exact message: it is the one the developer needs.

On a large board, the command line avoids web timeouts entirely:

Code:
php cmd.php xf:addon-upgrade Vendor/AddOnId

4. A step fails with a database error​

If the same step fails every time with an SQL message (for example a column or a default value refused by MariaDB), the add-on's upgrade code does not suit your database server. This is a bug for the developer, not something to fix by hand in phpMyAdmin.

  • Do not uninstall the add-on to "start clean": uninstalling deletes its data.
  • Copy the full error, your XenForo version, your PHP version and your MySQL or MariaDB version.
  • Send that to the developer. Once a fixed version is out, install it over the current files and click Upgrade. Your data stays where it is.

5. Uploading over FTP instead of the archive​

Unzip the archive and upload the contents of its upload folder to your board root, overwriting existing files. Then go to Admin CP > Add-ons and click Upgrade. Afterwards, Admin CP > Tools > File health check tells you if a file did not arrive or was not overwritten.

Checklist before you report it​

  • The add-on and the version you were upgrading to.
  • The full text of the error, or the entry from Logs > Server error log with its stack trace.
  • Whether you used the archive installer, FTP or the command line.
  • Your XenForo, PHP and database versions.

For XenSupport add-ons, open a ticket in Support tickets (only you and I can read it). Related guides: How to update an add-on to a new version and How to report a bug that gets fixed fast.
 
Ready to make your forum unforgettable?Browse the storeSee the plans