XF 1.5 Error between uploading files and installing upgrade

Lukas W.

Well-known member
I've tried to update my local 1.4.10 Installation to 1.5.0, but after copying the files and trying to head to the page, the following error is thrown:
Failed to get controller response and reroute to error handler (XenForo_ControllerPublic_Index::actionindex)
An exception occurred: Undefined index: use_tfa in C:\xampp\htdocs\library\XenForo\Visitor.php on line 678

XenForo_Application::handlePhpError() in XenForo/Visitor.php at line 678
XenForo_Visitor->offsetGet() in XenForo/ControllerPublic/Abstract.php at line 269
XenForo_ControllerPublic_Abstract->_assertTfaRequirement() in XenForo/ControllerPublic/Abstract.php at line 25
XenForo_ControllerPublic_Abstract->_preDispatchType() in XenForo/Controller.php at line 310
XenForo_Controller->preDispatch() in XenForo/FrontController.php at line 346
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in C:/xampp/htdocs/index.php at line 13

After directly opening the ACP and installing the upgrade it works, but I could imagine this is a somewhat confusing situation for less experienced users. Disabling listeners didn't help by the way, so I guess this is a XenForo-Internal.

I've been somewhat unsure whether to post this directly into the bug report section or not, as I was not completely conviced that this is an actual problem on XenForos end. Maybe someone else has experienced this phenomenon and/or knows where it comes from?
Error's are expected during the time between uploading files and not yet running the upgrade - the files expect the new database fields, but they haven't been created yet.

That's why during upgrades I put forum offline by adding this code to library/config.php
if ($_SERVER['REMOTE_ADDR'] != '')
   header('HTTP/1.1 503 Service Temporarily Unavailable');
   header('Status: 503 Service Temporarily Unavailable');
   header('Retry-After: 600');
   die('Website is currently down for maintenance.');
Replace with your IP
It's worth noting that our upgrade instructions have you go directly to the upgrade system. I know some people go to a page in the ACP to click the link, but depending on the level of upgrade, this can't always be done, which is why we recommend going directly to the upgrade URL.

I'd also note that specific error messages are only actually displayed to admins (or in debug mode).
Thanks for the feedback. I've already been around when 1.3 updated to 1.4, but I never came into a situation of actually doing such a big upgrade, so this was kind of an unfamiliar experience for me.

I'm going to use that when I update my live installation, thanks!
Top Bottom