Error after 2.014 install - blocked from site - Error 500

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

Previous topic - Next topic

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: