MyBB Community Forums

Full Version: SQL Error:1054 - Unknown column 'canusecustomtools'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I upgraded MyBB from 1.6.13 to 1.8.3 and ran into this issue:
 
The following warnings occurred: Warning [2] Invalid argument supplied for foreach() - Line: 331 - File: global.php PHP 5.3.29 (Linux)
 
File  Function/global.php
Line 331
errorHandler->error

File  /index.php
Line 18
require_once
 
The root problems seems to be in the global.php, with this line:
 
Line 331:  foreach($theme['disporder'] as $style_name => $order)

Suggestions on how to solve this problem would be greatly appreciated.
 
Two things I forgot to do before I installed the upgrade, one, I forgot to backup the files (although I did back up the database), and two, I forgot to disable the plugins. It would have been handy to have a reminder about disabling plugins on the upgrade instructions page (but then again, there was a reminder to backup my files and I still failed to do that... oops).

I do have copies of all my custom CSS and graphics saved, so I can restore/rebuild my custom themes, once I get the board working again. I am just hoping not to lose all my forum posts, and such.

MACJR of MACJR'S Mini-Verse² Forums

Additional information:

After deleting the contents of the plugin folder, I re-tried installing the upgrade.

This is the message I get (the same one I originally got from the first attempt to upgrade my board).


"Updating Database

Performing necessary upgrade queries...

MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.
SQL Error:1054 - Unknown column 'canusecustomtools' in 'mybb_moderators'Query:ALTER TABLE mybb_moderators ADD canmanageannouncements tinyint(1) NOT NULL default '0' AFTER canusecustomtools
Please contact the MyBB Group for technical support."

My PHP skills are limited, so a suggestion on how to fix this would be of great help.

Thank you.

MACJR
Update 2:

I solved the SQL Error. It took some fumbling about in MyPHPAdmin, but I finally figured it out. The first problem I listed seems to have been solved too.

However, this message popped up after the upgrade finished:

"Fatal error: Call to a member function run_hooks() on a non-object in /macjr.com/mybb/inc/class_parser.php on line 116"

I was able to log into the board though, and all my members are still present, but I will have to find and re-attache their avatars.  I didn't lose my custom themes either, that's a plus.

I have not had time to assess the full situation, so I am not asking for help just yet on this latest issue, but not marking this case as solved yet either.

I will be back to update, or close, this case after I have had time to look things over... but at least my board appears to be fixable now.

MACJR

Last update:

My board seems to be working, but it will take days to fix my themes, and the new MyBB default theme too.

Many of the graphics were unplugged, and there were so many changes to the templates that it may take weeks to find and fix all the problems this caused me.

I have no idea what that "Fatal error" (mentioned above) may be, or when it may come back and bite me, but if that does end up being a problem, I will come back and start another thread on that issue.

Since the original issues, that I posted about, have been solved, this case is closed.

MACJR
which version of php your forum is using (it is available at home page of the forum admin panel)

have you disabled the plugins before starting the upgrade and do you have any active MyCodes ?

run file verification tool available at tools & maintenance section of admin panel to find
the changed / missing files. ignore files reported from install folder & its sub-folders.
replace any reported files from the source files package of MyBB

for the theme, it would be better to install a new theme compatible with MyBB 1.8.x & use it
http://community.mybb.com/mods.php?actio...ory=themes
(2014-12-01, 02:17 AM).m. Wrote: [ -> ]which version of php your forum is using (it is available at home page of the forum admin panel)

have you disabled the plugins before starting the upgrade and do you have any active MyCodes ?

run file verification tool available at tools & maintenance section of admin panel to find
the changed / missing files. ignore files reported from install folder & its sub-folders.  
replace any reported files from the source files package of MyBB

for the theme, it would be better to install a new theme compatible with MyBB 1.8.x & use it
http://community.mybb.com/mods.php?actio...ory=themes


PHP version 5.3.29, and yes, I know that my web host is overdue for a PHP upgrade.

No, I forgot to turn off the plugins before starting the upgrade. I do not think this was the cause of the problems I was having though. I have not used MyCode for anything yet.

The board seems to be working properly now. All files pass the file verification test.

As for board themes, I design my own. I will have to start over, using the new default theme as a new template. This is not a huge problem for me, just time consuming. I grumble and groan, but in reality, it is exciting to be getting back to work on this, since I have taken some time off of working with styles and such. I am all rested and ready for this now.  Smile

Thanks for the impute, but I think everything is okay now.

MACJR
^ regarding php version, I did not mean to rush for upgrade. that might have its own issues. just wanted to know to analyze the error.
Thanks for the word impute - I need to understand its meaning Wink (edit: the questions are needed to provide suggestions)
(2014-12-01, 04:12 AM).m. Wrote: [ -> ]^ regarding php version, I did not mean to rush for upgrade. that might have its own issues. just wanted to know to analyze the error.
Thanks for the word impute - I need to understand its meaning Wink (edit: the questions are needed to provide suggestions)

Impute, input, it is all too easy to confuse the two, even for someone who likes to play with words as much as I do.  Wink

I should have typed input in my last post though.

MACJR
Edit: Nevermind. I'm an idiot. I selected the wrong 1.6 version to upgrade from.

Problem resolved.