Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: KEA on January 03, 2018, 01:41:36 PM

Title: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 03, 2018, 01:41:36 PM
I used the package manager to upgrade from 2.013 to 2.014.  It said all was successful but now all pages are blocked. 

"The package was installed successfully. You should now be able to use whatever functionality it adds or changes; or not be able to use functionality it removes."


www.sawmillandtimberforum.com (http://www.sawmillandtimberforum.com)

HELP! 

I have NO CLUE how to change anything on the server so anyone that can point me in the direction to fix this is greatly appreciated. 

Kirk Allen
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 03, 2018, 02:19:33 PM
Looks like the server company got it working but not sure what they did but now have a new problem.

When I try to add a new forum board I get this message? 

Field 'board_color' doesn't have a default value
File: /home/kallen/public_html/Sources/Subs-Boards.php
Line: 790

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.14, while your database is at version 2.0.11. The above error might possibly go away if you execute the latest version of upgrade.php.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 03, 2018, 04:07:01 PM
According to the server tech support:  "From the message it sounds like the software was updated but an upgrade script was not run (which will upgrade the database and anything else that needs to be done on the back end). Upgrading SMF is not a service that we provide."

Any suggestions how to upgrade script?
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: vbgamer45 on January 03, 2018, 04:17:35 PM
You have to add a default to into the smf_boards table in the board_color column in the database structure that appears to be coming from a modification
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 03, 2018, 05:34:30 PM
How do I go about doing that?
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: vbgamer45 on January 03, 2018, 05:49:38 PM
Phpmyadmin would be the best or you can contact your host to make the change.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 03, 2018, 05:55:56 PM
I found the smf_boards in Phpmyadmin but not sure how to add a default as suggested?  Not seeing board_color?
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: vbgamer45 on January 03, 2018, 05:58:01 PM
It might not be that table. that was a guess on my part.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 03, 2018, 06:06:53 PM
SMF error suggests a database upgrade?  How do I do that?  Not finding anything on updating.php database.
Title: Re: How to upgrade the database?
Post by: KEA on January 03, 2018, 06:40:35 PM
I keep getting an error pointing to possible database needing to upgrade each time I try to add a new category on our forum.  Won't add the category and keeps giving me the error message.
Title: Re: Re: How to upgrade the database?
Post by: Steve on January 03, 2018, 06:50:58 PM
Split your question off. Let's not get the two problems confused even though yours may be similar.
Title: Re: Re: How to upgrade the database?
Post by: Illori on January 03, 2018, 08:02:12 PM
what is the full error message you are seeing?
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Illori on January 03, 2018, 08:03:17 PM
You have to add a default to into the smf_boards table in the board_color column in the database structure that appears to be coming from a modification

this is all you need to do to fix your issue. if you dont know how to do that you should post in the mods support topic that added that column. you dont need to upgrade your database as there have been no database changes to apply.
Title: Re: How to upgrade the database?
Post by: KEA on January 03, 2018, 10:01:16 PM
This is the message I get when I try to add a catagory to my forum.

Field 'board_color' doesn't have a default value
File: /home/kallen/public_html/Sources/Subs-Boards.php
Line: 790

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.14, while your database is at version 2.0.11. The above error might possibly go away if you execute the latest version of upgrade.php.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 03, 2018, 10:04:05 PM
Dont know how to do it and not finding where to post in Mod Support?
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Sir Osis of Liver on January 03, 2018, 10:08:43 PM
You need to identify the mod that added the code to Subs-Boards.php, it's not in core code.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 03, 2018, 10:09:17 PM
You have to add a default to into the smf_boards table in the board_color column in the database structure that appears to be coming from a modification

this is all you need to do to fix your issue. if you dont know how to do that you should post in the mods support topic that added that column. you dont need to upgrade your database as there have been no database changes to apply.

When you say "this is all you need to do to fix your issue", I don't know what your pointing to that is what I need to do?  I have been unable to even locate a board_color entry and even if I found it I don't know what to do with it when I do find it.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 03, 2018, 10:09:40 PM
You need to identify the mod that added the code to Subs-Boards.php, it's not in core code.


How do I find the mod? 
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Sir Osis of Liver on January 03, 2018, 10:17:30 PM
Look in Admin -> Package Manager, post a list of installed mods.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 03, 2018, 10:25:44 PM
Modification Packages — Installed  Help
Mod Name   Version   
1.   SMF 2.0.15 Update   1.0     [ Uninstall ] [ List Files ] [ Delete ]
2.   Country Flags   3.0     [ Uninstall ] [ List Files ] [ Delete ]
3.   Anti-spam by CleanTalk   2.00     [ Uninstall ] [ List Files ] [ Delete ]
4.   Admin Ban Button in Post   3.0     [ Uninstall ] [ List Files ] [ Delete ]
5.   Users Online Today   2.1     [ Uninstall ] [ List Files ] [ Delete ]
6.   Global Headers Footers   2.0     [ Uninstall ] [ List Files ] [ Delete ]
7.   Anti Bot: Are You Human/Bot?   3.0     [ Uninstall ] [ List Files ] [ Delete ]
8.   Add IP2Location to Track IP   1.31     [ Uninstall ] [ List Files ] [ Delete ]
9.   Recent Topics On "Recent Posts" Page   1.2     [ Uninstall ] [ List Files ] [ Delete ]
10.   Sorted Package Manager Listing   1.2     [ Uninstall ] [ List Files ] [ Delete ]
11.   Language Drop Down   1.5.3     [ Uninstall ] [ List Files ] [ Delete ]
12.   Google Member Map   2.6     [ Uninstall ] [ List Files ] [ Delete ]
13.   Yet Another YouTube BBCode Tag   3.11     [ Uninstall ] [ List Files ] [ Delete ]
14.   Previous and Next Links for Page Index   2.1.204     [ Uninstall ] [ List Files ] [ Delete ]
15.   Ad Managment   3.2     [ Uninstall ] [ List Files ] [ Delete ]
16.   SMF Gallery Pro   7.2.1     [ Uninstall ] [ List Files ] [ Delete ]
17.   Referrals System   3.1     [ Uninstall ] [ List Files ] [ Delete ]
18.   Delete Spam Posts   1.6     [ Uninstall ] [ List Files ] [ Delete ]
19.   Bot Buster   1.1     [ Uninstall ] [ List Files ] [ Delete ]
20.   Topic Limit On Board   1.0     [ Uninstall ] [ List Files ] [ Delete ]
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Sir Osis of Liver on January 03, 2018, 10:34:44 PM
Not seeing anything that would involve a board color.  Can you attach your Subs-Boards.php?
Title: Re: Re: How to upgrade the database?
Post by: KEA on January 03, 2018, 10:37:48 PM
This message after upgrading to 2.0.15

Field 'board_color' doesn't have a default value
File: /home/kallen/public_html/Sources/Subs-Boards.php
Line: 790

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.15, while your database is at version 2.0.11. The above error might possibly go away if you execute the latest version of upgrade.php.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 03, 2018, 10:40:51 PM
File Attached
Not sure why it uploaded it twice but they are the same file.
Title: Re: Re: How to upgrade the database?
Post by: Sir Osis of Liver on January 03, 2018, 10:40:57 PM
You're running two threads on same problem, makes it difficult to assist you.  The database version has nothing to do with your problem, there have been no db changes in 2.0 branch.  Upgrading from .14 to .15 doesn't touch the db.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 03, 2018, 10:48:17 PM
I gave the error to the server host and they say- "If you can tell us what the default should be (or they give you specific syntax to add it) we should be able to do that for you."

No clue what the default should be or what syntax to add it?
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Sir Osis of Liver on January 03, 2018, 11:08:50 PM
Looks like it may be from Board color and icons (https://custom.simplemachines.org/mods/index.php?mod=3023) mod.  The mod code is not in your Subs-Boards.php, but it also adds board_color to ManageBoards.template.php and ManageBoards.php.  The mod must have been installed, then uninstalled, and it didn't uninstall cleanly.  You can parse the code at the mod link and remove remnant code manually.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Illori on January 04, 2018, 05:01:56 AM
You can parse the code at the mod link and remove remnant code manually.


the issue is in the database, not in files. if the mod is not in use the column board_color has to be removed from the boards table.
Title: Re: How to upgrade the database?
Post by: Kindred on January 04, 2018, 08:29:28 AM
Your error is due to a mod.... in combination with your MySQL version.

You either need to assign a default value for that column (and others) or get a newer version of MySQL...   MySQL introduced this error for several versions, requiring workarounds in code before they finally fixed it.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Kindred on January 04, 2018, 08:31:06 AM
 Why do you have two thread open with this question?
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 04, 2018, 09:36:51 AM
Why do you have two thread open with this question?

The other one was marked resolved to negate the two thread issue.  I commented on another person thread with a similar issue then it got separated somehow, I am assuming by admin. 
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 04, 2018, 09:39:20 AM
Looks like it may be from Board color and icons (https://custom.simplemachines.org/mods/index.php?mod=3023) mod.  The mod code is not in your Subs-Boards.php, but it also adds board_color to ManageBoards.template.php and ManageBoards.php.  The mod must have been installed, then uninstalled, and it didn't uninstall cleanly.  You can parse the code at the mod link and remove remnant code manually.

Considering I am on old sawmiller, I am not following the foreign language on how to fix this LOL.  Can you be so kind to give me a beginners version of what I need to do to fix this problem? 
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 04, 2018, 09:41:51 AM
Looks like it may be from Board color and icons (https://custom.simplemachines.org/mods/index.php?mod=3023) mod.  The mod code is not in your Subs-Boards.php, but it also adds board_color to ManageBoards.template.php and ManageBoards.php.  The mod must have been installed, then uninstalled, and it didn't uninstall cleanly.  You can parse the code at the mod link and remove remnant code manually.

Not finding a Board_color mod installed at anytime when looking in Package Manager? 
Title: Re: How to upgrade the database?
Post by: Kindred on January 04, 2018, 09:42:12 AM
Your error is due to a mod.... in combination with your MySQL version.

You either need to assign a default value for that column (and others) or get a newer version of MySQL...   MySQL introduced this error for several versions, requiring workarounds in code before they finally fixed it.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 04, 2018, 10:07:16 AM
OK guys, Im really trying to learn how to fix this but now am not sure what instruction to follow?

Looks like it may be from Board color and icons (https://custom.simplemachines.org/mods/index.php?mod=3023) mod.  The mod code is not in your Subs-Boards.php, but it also adds board_color to ManageBoards.template.php and ManageBoards.php.  The mod must have been installed, then uninstalled, and it didn't uninstall cleanly.  You can parse the code at the mod link and remove remnant code manually.


So when I find the parse code for my version 2.0.15 I look for the "find" code and just remove it, or do I then replace it with the suggested new code? 

For example, I found the code in the /Themes/default/BoardIndex.template.php -
                  <a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
Instructions tell me to replace it with -
                                    <a class="subject" href="', $board['href'], '" name="b', $board['id'], '"', !empty($board['color']) ? ' style="color: ' . $board['color'] . ';">' : '>', $board['name'];
                  if (!empty($board['icon']))
                  echo ' <img src="',  $board['icon'], '" style="width: 18px; height: 18px;" alt="" />';
                  echo '</a>';

Although there are more to find and replace, is this the process to follow for this fix?  Remove, or Remove and Replace?

Additionally, how do I remove and install the new code?  I can view the code but not sure how to actually perform the edit? 

OR, is this the problem?
You either need to assign a default value for that column (and others) or get a newer version of MySQL...   MySQL introduced this error for several versions, requiring workarounds in code before they finally fixed it.

I am not what version of MysQl I have as when I selected it on the server it doesnt tell me what version it is.?
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 04, 2018, 10:10:40 AM
Your error is due to a mod.... in combination with your MySQL version.

You either need to assign a default value for that column (and others) or get a newer version of MySQL...   MySQL introduced this error for several versions, requiring workarounds in code before they finally fixed it.
This is the info I Could find on MySqQL

MySQL Databases
Created by Documentation, last modified on Nov 30, 2017
For cPanel & WHM version 68
(cPanel >> Home >> Databases >> MySQL Databases)

How do I go about applying the fix you suggest?
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 04, 2018, 10:25:38 AM
So what direction do I follow guys?

1. Sir Osis of Liver - Looks like it may be from Board color and icons mod.  The mod code is not in your Subs-Boards.php, but it also adds board_color to ManageBoards.template.php and ManageBoards.php.  The mod must have been installed, then uninstalled, and it didn't uninstall cleanly.  You can parse the code at the mod link and remove remnant code manually.

2. Illori - the issue is in the database, not in files. if the mod is not in use the column board_color has to be removed from the boards table.

3. Kindred - Your error is due to a mod.... in combination with your MySQL version.
You either need to assign a default value for that column (and others) or get a newer version of MySQL...   MySQL introduced this error for several versions, requiring workarounds in code before they finally fixed it.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Aleksi "Lex" Kilpinen on January 04, 2018, 10:45:34 AM
It would seem to me that all those are just a little differently approaching the same problem. A mod install or uninstall gone wrong.
What mods do you have installed, and are you sure you haven't had the "Board color and icons mod" installed?
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 04, 2018, 11:06:16 AM
It would seem to me that all those are just a little differently approaching the same problem. A mod install or uninstall gone wrong.
What mods do you have installed, and are you sure you haven't had the "Board color and icons mod" installed?

Mods installed was included earlier in the thread.  Have not found any Board color and icons mod installed?
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Illori on January 04, 2018, 11:07:05 AM
have you always been admin? if not possible someone in the past had installed the mod.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Sir Osis of Liver on January 04, 2018, 04:00:39 PM
You can parse the code at the mod link and remove remnant code manually.

the issue is in the database, not in files. if the mod is not in use the column board_color has to be removed from the boards table.

If the mod was completely removed, wouldn't the column be ignored?  It's not used by anything else, if the remnant code wasn't calling it, SMF shouldn't see board_color, and even if mysql sees it, field should have last value from before mod was uninstalled.

@KEA - Assuming there isn't another mod that adds board_color, you only have to remove the mod code from  ManageBoards.template.php and ManageBoards.php, it's already gone from Subs-Boards.php.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Illori on January 04, 2018, 04:20:35 PM
no the column would not be ignored as it still has to be filled with something, hence the error that there is no default value to fill it with.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Arantor on January 04, 2018, 04:22:24 PM
It doesn't matter whether SMF sees it or not - the database does. And the database doesn't have a default value for it - and because SMF doesn't know about it, it can't supply one either.

Recommended solution: give MySQL a default value for the column:

Code: (fix the missing default) [Select]
ALTER TABLE smf_boards ALTER board_color SET DEFAULT '';
No amount of changing the code, short of reinstalling the mod or manually altering the query to add a value, is going to fix this.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Sir Osis of Liver on January 04, 2018, 04:27:07 PM
If the mod had installed correctly, wouldn't it have left a default value after it was uninstalled?
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Illori on January 04, 2018, 04:28:34 PM
If the mod had installed correctly, wouldn't it have left a default value after it was uninstalled?


not if the mod never defined one to start with.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Sir Osis of Liver on January 04, 2018, 04:34:43 PM
Why not just remove the column?
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Illori on January 04, 2018, 04:37:41 PM
it has been suggested already in this topic. that will work as well or to run the query arantor provided will fix it as well.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Sir Osis of Liver on January 04, 2018, 04:42:32 PM
not if the mod never defined one to start with.

Would this be considered a bug in the mod?
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Illori on January 04, 2018, 04:49:03 PM
i dont think so, as it has been said in this topic it is mysql changes that are making this show up or not depending on version.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Sir Osis of Liver on January 04, 2018, 05:05:17 PM
Ok, thanks.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 04, 2018, 08:33:29 PM
Server host tried this and still no fix:
"We could not add a default (the data type will not allow a default) so we just changed the column to not be required."

Tried to add a board and still get the same exact error message.
Field 'desc_color' doesn't have a default value
File: /home/kallen/public_html/Sources/Subs-Boards.php
Line: 790

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.15, while your database is at version 2.0.11. The above error might possibly go away if you execute the latest version of upgrade.php.
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 04, 2018, 08:34:39 PM
I have been the Admin for this site from day one and I can't find the mod in question ever getting installed?
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Sir Osis of Liver on January 04, 2018, 11:09:25 PM
Doesn't matter, that field is not required by core code, just delete the column from the table (backup the db first).
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: KEA on January 05, 2018, 09:50:18 AM
The server host sent this message.  Problem fixed.

"The two _color columns where defined as text data type. The problem is that text data types can't have defaults, so the only option was to change it to be not required."
Title: Re: Error after 2.014 install - blocked from site - Error 500
Post by: Arantor on January 05, 2018, 09:53:38 AM
Well,they could also have made it a varchar(100) field and given it a default, that would have worked too... but there's no way they could have known that.