News:

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

Main Menu

Field 'aliases' doesn't have a default value

Started by jsx, October 01, 2022, 11:50:17 AM

Previous topic - Next topic

jsx

Hi. When I want to add a new emoticon, I get this error:

Database error: Field 'aliases' doesn't have a default value



Please give me a tip on how to fix it. When I had a forum on 2.0.x, this error did not occur.

Aleksi "Lex" Kilpinen

#1
Not sure what field that is, or where it's from - but the actual issue is probably very easy to fix.
Find the field in your database, and assign it a default value. Most commonly, NULL will work and will not cause any issues.

P.S. It's nothing to do with the SMF version, most likely either your database settings have changed, or you used to have some modification that always provided something to that field so you didn't run in to this issue.
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

jsx

The problem is that this emoticon is not added at all, I don't see this the emoticon in the smf_smileys table. I can't add any emoticon to the set because I get this error.

Aleksi "Lex" Kilpinen

Quote from: jsx on October 01, 2022, 12:19:10 PMThe problem is that this emoticon is not added at all, I don't see this the emoticon in the smf_smileys table. I can't add any emoticon to the set because I get this error.
Yes, but if you assign a default value to that field in your database, it will fix this and you will again be able to add emoticons all you want.
Currently it doesn't work because your database doesn't allow empty fields, yet it is supplied a row without data to input in this field, and throws a fit because it doesn't know what to do with it.
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

jsx

Okay, I solved this issue.

phpmyadmin > smf_smileys table > Columns > aliases - I set null here.

Thanks for the help.

Advertisement: