XF 2.0 Downgrading back to 2.0.0

KozmoK

Active member
How the heck do I downgrade? I re-uploaded 2.0.0 and its saying "An upgrade was found for a version of XenForo that is newer than the uploaded files. Please reupload all of the files for the new version and reload this page."

My custom app stopped working after 2.0.1, so I need to roll back asap as my customers are all down now.
 
Strictly speaking, the only way to downgrade is to restore a backup (files and DB).

What broke in your app? Third-point releases should virtually never break code/add-ons integrated with XenForo.
 
You guys must have changed some stuff in User Upgrades and removed some of the finders.

[root@hackersadvantage forums]# cat php_errors.log
[19-Dec-2017 17:38:59 UTC] PHP Fatal error: Class 'XF\Mvc\Entity\Finder' not found in /hackersadvantage/forums/src/XF/Finder/User.php on line 7
[19-Dec-2017 17:39:32 UTC] PHP Fatal error: Class 'XF\SubContainer\AbstractSubContainer' not found in /hackersadvantage/forums/src/XF/SubContainer/BbCode.php on line 7
[19-Dec-2017 17:51:07 UTC] PHP Fatal error: Class 'XF\Mvc\Entity\Repository' not found in /hackersadvantage/forums/src/XF/Repository/User.php on line 9

This really took me down for many hours, not too happy.

Also I was using a php authenticate files from a direct php file, that worked fine until today.
 
None of those things changed with this upgrade. Those errors would generally be indicative of files not being uploaded as expected.
 
Ok, found out more info. I was using some legacy xenfo code my php files were calling for external c++ app authentication in Library/Xenforo - you guys did something that it redirects it to a /install folder.


require($fileDir . '/library/XenForo/Autoloader.php');
XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');


XenForo_Application::initialize($fileDir . '/library', $fileDir);
XenForo_Application::set('page_start_time', $startTime);
 
Last edited:
Well that's XF1 code so there isn't any expectation that it'd work any longer. All XF1 code needs to be rewritten to work with XF2. If that worked before it was really dumb luck and it likely would have silently failed at any point.

We explicitly rename the old config file now to avoid confusion.
 
I'm in a real bind here, I have hundreds of customers that can't log into my 3rd party app because somehow you removed access to the old authentication method in /library/Autoloader

I dont have a auto backup program for the db, so I am stuck. Is there a way to brute force the version back?

it keeps redirecting calls to ../install/index.php

<?php error_reporting(E_ALL) ; ini_set('display_errors',1); ?>
<?php
include "/hackersadvantage/scripts/LOG.php";
$log = new Logging();
$log->lfile('/hackersadvantage/logs/loader.log');
if(isset($_POST['USERNAME'])) { $username = trim($_POST['USERNAME']); }
#$username = trim($_POST['USERNAME']);
include "/hackersadvantage/LoaderPHP/Functions.php";

$password = $_POST['PASSWORD'];
$ip = $_SERVER['REMOTE_ADDR'];
$staff = 0;

$startTime = microtime(true);
$fileDir = '/hackersadvantage/forums';

require($fileDir . '/library/XenForo/Autoloader.php');
XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');


XenForo_Application::initialize($fileDir . '/library', $fileDir);
XenForo_Application::set('page_start_time', $startTime);


$log->lwrite("HERE1");
 
For now just rename library/xf1-config.php to library/config.php.

But what you really need to do is rewrite your code so it no longer depends on any XF1 code.
 
Just to be clear though there’s no expectation, that code should ever work in XF2. Its only working, as Mike says, almost by luck, because the old XF1 files are on the server.

My workaround above will get it going again, but you really do need to rewrite the code to work properly with XF2, otherwise your code will always have a dependency on XF1 files and configuration available and some level of backwards compatibility which we certainly can’t guarantee (for example if we ever added different authentication methods).
 
I'm in a real bind here, I have hundreds of customers that can't log into my 3rd party app because somehow you removed access to the old authentication method in /library/Autoloader

I dont have a auto backup program for the db, so I am stuck. Is there a way to brute force the version back?

Prior to any upgrades, you must perform a full backup (DB + file system) in case you need to do a rollback.

What will you do if your server crashes, gets hacked or your host disappears?

What will you tell your customers?
 
Yes, I normally had a add-on that backed up nightly. But obviously it does not work with XF2.0 - I know I should have backed it up manually.
Never had an issue.

With that being said, I will write a cron script to do this from now on.
Koz
 
Top Bottom