Trying to add a new board and got Error: database may require an upgrade...

Started by PenelopeQ, December 04, 2016, 05:29:06 PM

Previous topic - Next topic

PenelopeQ

I've noticed quite few threads with this same error message issue, so apparently this has become a common problem:

QuoteField 'facebooksharer_board_enable' doesn't have a default value
File: /home/rollerco/public_html/mlcforum/Sources/Subs-Boards.php
Line: 799

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.12, while your database is at version 2.0.1. The above error might possibly go away if you execute the latest version of upgrade.php.
I got the message when trying to add a new board.
I was on smf 2.0.11, but as part of this solution I did upgrade to 2.0.12--and yes I backed everything up first.
But I went to myurl.com/upgrade.php and got this:
Quote[an error occurred while processing this directive]

Now when I was using smf 2.0.11 I don't recall the portion about facebooksharer_board... I think it was just the Note: it appears that your database...


Here is a list of my mods
1. Alternative Menu With Top Menu Icon & Button Remover:1.4.2
2. Bad Behavior mod:1.5.17
3. Board Notification Mod:1.2.2
4. Default_Membergroup:1.0.1
5. Gender on Memberlist:1.5
6. Global Headers Footers:2.0.1
7. Last Active On MemberList:1.4
8. Move Old Topics:1.3.8
9. Personal Messages to Membergroups:1.4.3
10. Register At Post View v.1.1:1.1
11. SMFPacks WYSIWYG Editor:2.0.7
12. SMFPacks Personal Conversations:1.0.3
13. SMFPacks Popup Pro Mod:1.0.3
14. Search Sent PMs:1.4
15. SMFPacks Shoutbox Pro:1.0.9
16. Stop Spammer:2.3.9
17. TopicStarter Mod:1.7
18. Topic & Board Note:1.0.3
19. Ad Managment:3.1a
20. Anti-Spam Links:1.0.1
21. Join Reason:1.3
22. Advanced Topic Prefix Mod:4.0.3
23. SMF 2.0.12 Update:1.0

br360

The note saying that your database may require an upgrade is just a stock message that comes along with any database error one may get, so that you can ignore.

The "facebooksharer_board_enable" is not part of the default SMF database. Even though you don't have it listed in your mods you posted, it appears that at one time you did have this mod installed and not every part of code was removed when you actually uninstalled it http://custom.simplemachines.org/mods/index.php?mod=2827

Kindred

Akso, the issue is actually a mysql bug. Tell your host to upgrade mysql
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

PenelopeQ

I contacted my host and they said it is not a mysql bug issue and kicked it back to me getting help here.
The facebook sharer mod offers an uninstall package that removes the database tables, but maybe I was supposed to use it a few years ago when I had and removed the mod. I tried uploading it like a normal package and it failed.

So basically, is the problem that a table (or more) exists in my database that is unnecessary? AND the resolution is for those tables to be removed?

If that is correct, is there a safe removal method--tinkering around with the DB freaks me out since I could break something so easily.

vbgamer45

If you don't use it you can try this command on your database
alter table smf_boards drop column facebooksharer_board_enable;
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Kindred

BTW< your host is wrong...


http://stackoverflow.com/questions/15438840/mysql-error-1364-field-doesnt-have-a-default-values

Quote


This appears to be caused by a long-standing (since 2004) bug (#6295) in MySQL, titled

    Triggers are not processed for NOT NULL columns.

It was allegedly fixed in version 5.7.1 of MySQL (Changelog, last entry) in 2013, making MySQL behave as "per the SQL standard" (ibid).
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

That might apply if triggers were being used. However SMF doesn't use triggers and no mod I've ever seen does either.

And actually, that behaviour is quite possible if a mod author hasn't set a table up correctly and MySQL is running in strict mode.

PenelopeQ

Quote from: vbgamer45 on January 17, 2017, 06:38:37 PM
If you don't use it you can try this command on your database
alter table smf_boards drop column facebooksharer_board_enable;

So I am assuming I'm to try this piece of advice first--given the back-and-forth regarding the other posts.
Can you explain how I input a command for the db table?
Basically which tab at the top of phpMyAdmin do I select and then where to go from there...I assume I can at some point copy and paste the command you suggested into a box or space and select Go.

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

PenelopeQ

Thanks, and I am not trying to be rude, but that doesn't answer the question I need answered.

Regarding inputting a command for the db table...
How do I do that?
Which tab at the top of phpMyAdmin do I select and then where to go from there?

Thank you

vbgamer45

You would select the database by clicking on the database name.
Then there should be an SQL tab to run the command.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

PenelopeQ

Thanks and UGH
I did that and it says there is not a board with that name. I then read through the list of columns in the db table  and there was nothing that had facebook or sharer as even part of the name.

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro


vbgamer45

hmmm don't see fooksharer_board_enabl in that file

Can you run this SQL on database

Show create table smf_boards;
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro


vbgamer45

Do you have any table in there called ###_boards ? where ### is the name.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

oOo--STAR--oOo

I think to fix this issue it to look at his actual database and make sure the names exist. Your database should be called rollerco_smf2 and the table should be named smf_boards  'smf' being the prefix.

Now look in your settings.php in your forums root directory, is the database name rollerco_smf2. If you have phpmyadmin open it up and look to see if this database exists. Go inside the database and check to see that smf_board table exists also.

Its basically saying it doesn't exist, are you sure it does.
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

PenelopeQ

Maybe the confusion is over what things are named.

The database is rollerco_smf2, but the prefix is different. All the columns begins with rollerc3_

rollerc3_boards
rollerc3_board_permissions not boards with an s, but I included this anyway)
rollerc3_log_boards

oOo--STAR--oOo

Quote from: PenelopeQ on January 27, 2017, 07:03:58 PM
Maybe the confusion is over what things are named.

The database is rollerco_smf2, but the prefix is different. All the columns begins with rollerc3_

rollerc3_boards
rollerc3_board_permissions not boards with an s, but I included this anyway)
rollerc3_log_boards

Yep, that looks like the problem if 'rollerc3' is your actual prefix.

In your forums root directory open Settings.php and what does $db_prefix = ' say?
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

PenelopeQ

Quote from: oOo--STAR--oOo on January 27, 2017, 07:06:17 PMIn your forums root directory open Settings.php and what does $db_prefix = ' say?

$db_prefix = 'rollerc3_';

Which makes sense since it's been this way for years.

Quote from: vbgamer45 on January 27, 2017, 07:14:51 PM
Run this query


Show create table rollerc3_boards;

Done and successfully executed. Is that supposed to solve the issue, or are there more steps to follow...because I tried to add a new board and got the same message.

oOo--STAR--oOo

No that doesn't solve your issue
Send me your /Sources/ManageBoards.php & /Themes/default/ManageBoards.template.php


You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

vbgamer45

you would need to run

alter table smf_boards drop column rollerc3_board_enable;
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

PenelopeQ

Quote from: oOo--STAR--oOo on January 27, 2017, 07:48:13 PMSend me your /Sources/ManageBoards.php & /Themes/default/ManageBoards.template.php
Attached.

Quote from: vbgamer45 on January 27, 2017, 08:06:04 PM
you would need to run

alter table smf_boards drop column rollerc3_board_enable;

I haven't done this yet as I thought maybe I should attach the docs requested and see if any advice changes.


oOo--STAR--oOo

ManageBoards.php is fine, the only mod that has edited this file is the  Topic & Board Note:1.0.3.
The template file is fine also. Either way the error is not corresponding to the actual problem. Can you get more error logs? Like your webserver error logs, are there any errors in here?

Also, can you do this, goto Admin -> Configuration -> Features and Options -> General

At the bottom you will see Disable evaluation of templates
Check this or un check it then produce the error again and tell me what is in the error log.
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

vbgamer45

I would run this query anyway

alter table smf_boards drop column rollerc3_board_enable;
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

PenelopeQ

Quote from: vbgamer45 on January 28, 2017, 07:42:02 PM
I would run this query anyway

alter table smf_boards drop column rollerc3_board_enable;

I got this: 1146 - Table 'rollerco_smf2.smf_boards' doesn't exist

Quote from: oOo--STAR--oOo on January 28, 2017, 05:58:30 PM
Can you get more error logs? Like your webserver error logs, are there any errors in here?
Do you mean from Admin -> Maintenance -> Logs?
Or from cpanel?

Quote from: oOo--STAR--oOo on January 28, 2017, 05:58:30 PMAlso, can you do this, goto Admin -> Configuration -> Features and Options -> General

At the bottom you will see Disable evaluation of templates
Check this or un check it then produce the error again and tell me what is in the error log.
That is not on that page. I did a search on the page for the word template and then for disable to make sure I was not missing it.

Kindred

I believe it is in server settings, not features

Also try this from phpmyadmin

alter table rollerc3_boards drop column board_enable;
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

PenelopeQ

Quote from: Kindred on January 28, 2017, 11:34:55 PM
I believe it is in server settings, not features

Also try this from phpmyadmin

alter table rollerc3_boards drop column board_enable;

Thanks, I found the box to disable evaluation of templates in server settings. I tried to add a board to see if the error was different and it was the exact same message.

Ran the query and got this: #1091 - Can't DROP 'board_enable'; check that column/key exists

vbgamer45

Sorry was tired made a mistake with my last one
try this one

alter table rollerc3_boards drop column facebooksharer_board_enable;
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

PenelopeQ

Great! That query worked--I even saw a shift in the columns on the sidebar as though something was being removed--even though I had not seen that column there. Weird.

But I still get the same error when trying to add a board.

oOo--STAR--oOo

Quote from: PenelopeQ on January 29, 2017, 09:20:26 AM
Great! That query worked--I even saw a shift in the columns on the sidebar as though something was being removed--even though I had not seen that column there. Weird.

But I still get the same error when trying to add a board.

Unfortunately, your error log is not providing us with the information we need to track that error. Its pointing to something that does not exist in your actual templates. Are you using the default theme? Was the template you send me for the default and not the actual theme you are using. If you are using the default theme, then I can't trace the error off the information you have given me because its pointing to something non existent.

Can you check your webserver error logs? They might show more information to this. Create the error and consult your host on getting these logs if you do not know how yourself.

You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

PenelopeQ

No, I am not using the default theme. I am using curve multicolor.
I will contact the host regarding server logs and get back to you when I hear from them.

PenelopeQ

Okay, I reproduced the error and the last few in the log are below. But my host said this
QuoteIn cPanel you can see the last 300 errors from Metrics / Errors.

In looking back at your ticket history, more than likely the errors will not show in the error log. The errors you are getting are errors within SMF. They would only show if the application (SMF) logged them.

Quote from: cpanel Metrics - Error[Sat Feb 04 15:14:45.479292 2017] [cgi:error] [pid 662485] [client 89.145.95.68:47306] AH01228: exec used but not allowed in /home/rollerco/public_html/mlcforum/404.shtml
[Sat Feb 04 15:14:29.751212 2017] [cgi:error] [pid 659817] [client 86.146.27.102:51183] AH01228: exec used but not allowed in /home/rollerco/public_html/mlcforum/404.shtml
[Sat Feb 04 15:14:29.619603 2017] [cgi:error] [pid 659817] [client 86.146.27.102:51183] AH01228: exec used but not allowed in /home/rollerco/public_html/mlcforum/404.shtml
[Sat Feb 04 15:14:29.487721 2017] [cgi:error] [pid 659817] [client 86.146.27.102:51183] AH01228: exec used but not allowed in /home/rollerco/public_html/mlcforum/404.shtml
[Sat Feb 04 15:14:29.333070 2017] [cgi:error] [pid 659817] [client 86.146.27.102:51183] AH01228: exec used but not allowed in /home/rollerco/public_html/mlcforum/404.shtml
[Sat Feb 04 15:14:28.851215 2017] [cgi:error] [pid 659817] [client 86.146.27.102:51183] AH01228: exec used but not allowed in /home/rollerco/public_html/mlcforum/404.shtml

vbgamer45

At this point you would probably need to have someone take a look at with admin access/ftp to try to figure out the exact cause.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: