Fixed Upgrader redirects back to ACP


Well-known member
When attempting to upgrade from Beta 1 to Beta 2, I'm getting this error...

XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'last_run_date' in 'where clause' in src/XF/Db/AbstractStatement.php at line 183

  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 34
  2. XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 44
  3. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 67
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 74
  5. XF\Db\AbstractAdapter->fetchRow() in src/XF/Job/Manager.php at line 357
  6. XF\Job\Manager->hasStoppedManualJobs() in src/XF/Admin/Controller/Index.php at line 95
  7. XF\Admin\Controller\Index->actionIndex() in src/XF/Mvc/Dispatcher.php at line 232
  8. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 85
  9. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
  10. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1777
  11. XF\App->run() in src/XF.php at line 320
  12. XF::runApp() in admin.php at line 13


Well-known member
After a few attempts, the upgrade is running. But, I'm don't know what changed that it started without error.


Well-known member
Before it started running, the upgrade system would take me back to the main admin screen and that error was displayed when it did.


XenForo developer
Staff member
Only guess is that the files weren't really uploaded as expected. There aren't any redirects to admin.php from the installer system (short of ones you click).


Well-known member
I just did this again on another installation.

After uploading files, the prompt to upgrade appears in the admin window with the error displayed.
I click on that and I get a login prompt.
After logging in, it takes be back to the main admin screen with the error displayed.
Click the link again and the upgrade process runs.


Well-known member
Ok, here we go...

After uploading files...

Click "Complete upgrade"...

After login...

Click "Complete upgrade" again...

After that, the upgrade runs.


XenForo developer
Staff member
So the bug is really just that the upgrader shouldn't redirect you back to the admin area. I will leave this on that basis.

But two things to note:
  1. You're only getting that error because you're in debug mode. The site is not accessible when an upgrade is pending otherwise. You need to expect errors to potentially happen in this case.
  2. Technically speaking, we do always direct you to go to <url>/install/ directly, instead of relying on logging into the control panel and clicking a link to the upgrade system as that won't always be reachable.