News:

Want to get involved in developing SMF, then why not lend a hand on our github!

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

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

Advertisement: