MyBB Hacks

Full Version: Problem after upgrade
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi after upgrade I am getting fallowing error:
The following warnings occurred:
Warning [2] Invalid argument supplied for foreach() - Line: 279 - File: inc/plugins/xthreads.php PHP 5.3.27 (Linux)
File Line Function
/inc/plugins/xthreads.php 279 errorHandler->error
/inc/class_plugins.php 101 xthreads_global
/global.php 101 pluginSystem->run_hooks
/forumdisplay.php 21 require_once

And I can't make new treads - its only opening white page.

Also - in admin panel I have error:
You have uploaded a newer version of XThreads, v1.63, however the version currently installed is v1.46. You may need to perform an upgrade for your board to be functional - to perform an upgrade, please click here.

But when I am pressing in admin panel - upgrade button - I am getting:
MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
    1060 - Duplicate column name 'xthreads_settingoverrides'
Query:
    ALTER TABLE `bb_forums` ADD COLUMN `xthreads_settingoverrides` text not null
Is your cache/ directory, including all files within it, writable by the webserver?
This also includes it ever being unwritable, with XThreads being installed.
Yes - all cache directory is writable by server
In that case, I'm guessing that you've attempted to upgrade at least twice, where it botched up the first time.

Okay, check if your forums table has a column/field named xthreads_force_postlayout.  If it does, then delete the xthreads_settingoverrides field from the forums table.
Otherwise, you've potentially got more problems.
xthreads_force_postlayout - no - this filed is missing. There are other xthreads fileds, but not that one
Okay, take a look at the threadfields table, is there a field named hidefield?

If yes, chances are the upgrader did all the upgrade tasks, but didn't update the version.  In which case, you can manually edit the version number inside cache/xthreads.php to be the new version.  After that, edit any threadfield, then check that cache/xthreads_evalcache.php file exists.

If no, then the upgrader probably broke mid-way, which is going to be problematic.  If you don't mind looking through PHP code, you can open up inc/xthreads/xt_upgrader.php and follow through to see what the upgrader does and revert changes it's made.
Otherwise, it may be easier to back up thread field and forum settings information, uninstall XThreads, then reinstall it.
Reference URL's