Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Yikesfactor on September 22, 2018, 06:13:37 AM

Title: Field 'img_name' doesn't have a default value
Post by: Yikesfactor on September 22, 2018, 06:13:37 AM
I mistakenly put a url into the Replacement Board Title image field, thinking it was for the top title. I took it out again.

Now trying to create a new board, I get this:


Field 'img_name' doesn't have a default value
File: /home/azrapeyq/public_html/writersanctum.com/Sources/Subs-Boards.php
Line: 794


Now what have I done wrong? How do I fix it.
Title: Re: Field 'img_name' doesn't have a default value
Post by: Kindred on September 22, 2018, 09:04:11 AM
sounds like a problem with a mod, since I don't think that is part of the core.
Title: Re: Field 'img_name' doesn't have a default value
Post by: Yikesfactor on September 22, 2018, 09:19:09 AM
Quote from: Kindred on September 22, 2018, 09:04:11 AM
sounds like a problem with a mod, since I don't think that is part of the core.

Ok thanks. I'll remove the mod then.
Title: Re: Field 'img_name' doesn't have a default value
Post by: Yikesfactor on September 22, 2018, 09:23:29 AM
Uninstalled the mod.

It didn't fix the problem. Still get the error message.

Modifying an existing board works fine. Just cant add a new one.
Title: Re: Field 'img_name' doesn't have a default value
Post by: vbgamer45 on September 22, 2018, 09:38:31 AM
Alter your smf_boards database struture in phpmyadmin change the default value of img_name column to have a default value of empty and allow null instead not null for the column
Title: Re: Field 'img_name' doesn't have a default value
Post by: Yikesfactor on September 22, 2018, 09:47:28 AM
Quote from: vbgamer45 on September 22, 2018, 09:38:31 AM
Alter your smf_boards database struture in phpmyadmin change the default value of img_name column to have a default value of empty and allow null instead not null for the column

Found it.

Was set to none, changed to null. Is that correct?
Title: Re: Field 'img_name' doesn't have a default value
Post by: vbgamer45 on September 22, 2018, 09:47:53 AM
Yes that should work.
Title: Re: Field 'img_name' doesn't have a default value
Post by: Yikesfactor on September 22, 2018, 09:54:00 AM
Quote from: vbgamer45 on September 22, 2018, 09:47:53 AM
Yes that should work.

Thanks. Done.

Ended up having to change all 3 img feilds, but that did the trick.

Thanks everyone. :)
Title: Re: Field 'img_name' doesn't have a default value
Post by: Kindred on September 22, 2018, 10:32:50 AM
I was reading quickly from my mobile... so I missed the fact that it was the standard "no default value" error...

  incidentally - it's an issue with your host's configuration -- they have mySQL STRICT mode turned on...
Title: Re: Field 'img_name' doesn't have a default value
Post by: Yikesfactor on September 22, 2018, 10:37:36 AM
Quote from: Kindred on September 22, 2018, 10:32:50 AM
I was reading quickly from my mobile... so I missed the fact that it was the standard "no default value" error...

  incidentally - it's an issue with your host's configuration -- they have mySQL STRICT mode turned on...

Is that good or bad?

What is recommended? I can ask them to change it.

The host had a crash earlier in the week, and a lot of settings seem to have been lost, or returned to defaults.
Title: Re: Field 'img_name' doesn't have a default value
Post by: Kindred on September 22, 2018, 09:34:09 PM
It'snot good or bad... it does mean that you may encounter the same issue with various mods
Title: Re: Field 'img_name' doesn't have a default value
Post by: Yikesfactor on September 22, 2018, 09:40:19 PM
Quote from: Kindred on September 22, 2018, 09:34:09 PM
It'snot good or bad... it does mean that you may encounter the same issue with various mods

I mentioned it to the host, and they asked if there was still a problem, so they might have changed it now. No change though to other issues.