Quote from: Aleksi "Lex" Kilpinen on March 19, 2021, 08:06:57 AMThe "Field 'karma_bad' doesn't have a default value" error is simple really, you just need to assign that field a default value in the database, usually if there is not one set already, NULL will do.
I have the same problem. I deleted the 2 tables that the previous colleague said, and it still gives me the same problem.
I updated my forum from an older version to the latest one, and everything was fine... until I decided to post. Any solution please? A hug and thank you!
If you deleted the table mentioned in the error, there is no possibility that the error is the same. Also, blindly deleting tables is a BAD idea.
If the error is still X "doesn't have a default value", the solution is still to give the mentioned field X a default value. Usually NULL will be fine.
Well the error is this:
Field 'karma_bad' doesn't have a default value
File: /home/icivjqn/www/foro/Sources/Subs-Post.php
Line: 1897
I don't know how to solve it. I need professional help, even if it costs me money please.
Locate the field in your database, and give it a default value.
Most likely, you would find this field in smf_messages.
You could try running ALTER TABLE smf_messages ALTER karma_bad SET DEFAULT NULL;
If this works, the error will likely change to a different field, that you will need to update as well.
Quote from: Aleksi "Lex" Kilpinen on July 29, 2024, 07:41:56 AMLocate the field in your database, and give it a default value.
Most likely, you would find this field in smf_messages.
You could try running ALTER TABLE smf_messages ALTER karma_bad SET DEFAULT NULL;
If this works, the error will likely change to a different field, that you will need to update as well.
TRUE.
Now it gave me this other error:
Field 'edit_reason' doesn't have a default value
File: /home/icivjqn/www/foro/Sources/Subs-Post.php
Line: 1897
I understand that they are the mods that I had previously installed and that I no longer have.
Do I have to set them all to NULL? I mean... the errors that I get every time I modify a new error?
Yeah, NULL is a fairly safe non-value. So if any error comes up with "doesn't have a default value", NULL usually works.
Quote from: Aleksi "Lex" Kilpinen on July 29, 2024, 07:49:43 AMYeah, NULL is a fairly safe non-value. So if any error comes up with "doesn't have a default value", NULL usually works.
yes!!!!
Thank you!
now it works perfect
In the future, please start your own topic rather than piggy backing on someone else's help thread.