News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Error after 2.014 install - blocked from site - Error 500

Started by KEA, January 03, 2018, 01:41:36 PM

Previous topic - Next topic

KEA

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

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

KEA

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.

KEA

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?

vbgamer45

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
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

KEA


vbgamer45

Phpmyadmin would be the best or you can contact your host to make the change.
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

KEA

I found the smf_boards in Phpmyadmin but not sure how to add a default as suggested?  Not seeing board_color?

vbgamer45

It might not be that table. that was a guess on my part.
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

KEA

SMF error suggests a database upgrade?  How do I do that?  Not finding anything on updating.php database.

KEA

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.

Steve

Split your question off. Let's not get the two problems confused even though yours may be similar.
DO NOT pm me for support!

Illori

what is the full error message you are seeing?

Illori

Quote from: 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

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.

KEA

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.

KEA

Dont know how to do it and not finding where to post in Mod Support?

Sir Osis of Liver

You need to identify the mod that added the code to Subs-Boards.php, it's not in core code.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

KEA

Quote from: Illori on January 03, 2018, 08:03:17 PM
Quote from: 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

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.

KEA

Quote from: 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.


How do I find the mod? 

Sir Osis of Liver

Look in Admin -> Package Manager, post a list of installed mods.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

KEA

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 ]

Sir Osis of Liver

Not seeing anything that would involve a board color.  Can you attach your Subs-Boards.php?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

KEA

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.

KEA

File Attached
Not sure why it uploaded it twice but they are the same file.

Sir Osis of Liver

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.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

KEA

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?

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.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Illori

Quote from: Sir Osis of Liver on January 03, 2018, 11:08:50 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.

Kindred

#27
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.
Сл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."

Kindred

 Why do you have two thread open with this question?
Сл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."

KEA

Quote from: Kindred on January 04, 2018, 08:31:06 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. 

KEA

Quote from: Sir Osis of Liver on January 03, 2018, 11:08:50 PM
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.

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? 

KEA

Quote from: Sir Osis of Liver on January 03, 2018, 11:08:50 PM
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.

Not finding a Board_color mod installed at anytime when looking in Package Manager? 

Kindred

Quote from: 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.
Сл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."

KEA

OK guys, Im really trying to learn how to fix this but now am not sure what instruction to follow?

Quote from: Sir Osis of Liver on January 03, 2018, 11:08:50 PM
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.


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.?

KEA

Quote from: Kindred on January 04, 2018, 09:42:12 AM
Quote from: 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.
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?

KEA

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.

Aleksi "Lex" Kilpinen

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?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

KEA

Quote from: 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?

Mods installed was included earlier in the thread.  Have not found any Board color and icons mod installed?

Illori

have you always been admin? if not possible someone in the past had installed the mod.

Sir Osis of Liver

Quote from: Illori on January 04, 2018, 05:01:56 AM
Quote from: Sir Osis of Liver on January 03, 2018, 11:08:50 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.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Illori

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.

Arantor

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.

Sir Osis of Liver

If the mod had installed correctly, wouldn't it have left a default value after it was uninstalled?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Illori

Quote from: 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?


not if the mod never defined one to start with.

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Illori

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.

Sir Osis of Liver

Quote from: Illori on January 04, 2018, 04:28:34 PM
not if the mod never defined one to start with.

Would this be considered a bug in the mod?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Illori

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.

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

KEA

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.

KEA

I have been the Admin for this site from day one and I can't find the mod in question ever getting installed?

Sir Osis of Liver

Doesn't matter, that field is not required by core code, just delete the column from the table (backup the db first).
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

KEA

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."

Arantor

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.

Advertisement: