Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: peterwaalker on June 15, 2016, 07:11:32 PM

Title: Database error when attempting to publish post
Post by: peterwaalker on June 15, 2016, 07:11:32 PM
I got database error while trying to publish post. Members of my forum have been complaining before now until i finally realized it is true.
please tell me what to do so as to correct this error.
thanks
Title: Re: Database error when attempting to publish post
Post by: Sir Osis of Liver on June 15, 2016, 09:33:19 PM
SMF version?
Mods installed?
Link to your forum?
Title: Re: Database error when attempting to publish post
Post by: peterwaalker on June 17, 2016, 02:25:14 AM
Quote from: Sir Osis of Liver on June 15, 2016, 09:33:19 PM
SMF version?
Mods installed?
Link to your forum?

The version is SMF 2.0.11 | Simple Machines.
No need asking about mods. I have not installed any mods for 1year 3months now.

I think this attached image might be helpful.
Title: Re: Database error when attempting to publish post
Post by: Shambles on June 17, 2016, 03:51:35 AM
That smells of a MySql upgrade behind your back.

Do a search for STRICT_TRANS_TABLES

Or have a ganders at the bottom of this page:

http://stackoverflow.com/questions/25865104/field-id-doesnt-have-a-default-value
Title: Re: Database error when attempting to publish post
Post by: peterwaalker on June 17, 2016, 04:01:25 PM
Quote from: Shambles on June 17, 2016, 03:51:35 AM
That smells of a MySql upgrade behind your back.

Do a search for STRICT_TRANS_TABLES

Or have a ganders at the bottom of this page:

http://stackoverflow.com/questions/25865104/field-id-doesnt-have-a-default-value

Yes! i found out my host upgraded MSQL. What pratical step by step method should i take now?
Thanks
Title: Re: Database error when attempting to publish post
Post by: vbgamer45 on June 17, 2016, 04:13:14 PM
See if you can dsiable strict mode in mysql
Title: Re: Database error when attempting to publish post
Post by: peterwaalker on June 17, 2016, 05:33:26 PM
Quote from: vbgamer45 on June 17, 2016, 04:13:14 PM
See if you can dsiable strict mode in mysql

please where can i locate the strict mode in mysql so i can disable it. I have taken a look in phpMYAdmin but couldn't anything.
thanks
Title: Re: Database error when attempting to publish post
Post by: vbgamer45 on June 17, 2016, 06:08:36 PM
https://support.kayako.com/article/472-how-do-i-disable-mysql-strict-mode-on-the-server
Title: Re: Database error when attempting to publish post
Post by: peterwaalker on June 18, 2016, 08:16:44 PM
Quote from: vbgamer45 on June 17, 2016, 06:08:36 PM
https://support.kayako.com/article/472-how-do-i-disable-mysql-strict-mode-on-the-server

QuoteHow do I disable MySQL strict mode on the server?

Please follow the under mentioned instructions to turn off the MySQL strict mode. Make the following changes in the "my.ini/my.cnf":

    1.  Look for the following line:
        sql-mode = "STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

    2.  Change it to:
        sql-mode="" (Blank)

    3. Restart the MySQL service.

I have not been able to implement the above steps because i did not see options i should take or maybe the functionality is made off limits by my host. What other method steps should i follow?
Title: Re: Database error when attempting to publish post
Post by: Illori on June 18, 2016, 09:17:01 PM
ask your host to do it if you cannot.
Title: Re: Database error when attempting to publish post
Post by: peterwaalker on June 23, 2016, 04:43:03 PM
My host said they could not do anything about this issue. They however suggest i should rather check with my forum software.
I don't know what to do now. I'm very very confused.
Could anything be done about it from SMF?
Title: Re: Database error when attempting to publish post
Post by: margarett on June 23, 2016, 06:32:42 PM
You installed a MOD which created a column "hiddeninfo" in your smf_messages table. That field isn't configured with a default value as it wasn't required before.
Now MySQL requires a default value in columns and it throws a hissy fit because there isn't one.

Most likely you don't have that MOD anymore so you could just delete the column. Please attach Subs-Post.php
Title: Re: Database error when attempting to publish post
Post by: peterwaalker on June 24, 2016, 03:34:31 AM
Quote from: margarett on June 23, 2016, 06:32:42 PM
You installed a MOD which created a column "hiddeninfo" in your smf_messages table. That field isn't configured with a default value as it wasn't required before.
Now MySQL requires a default value in columns and it throws a hissy fit because there isn't one.

Most likely you don't have that MOD anymore so you could just delete the column. Please attach Subs-Post.php

thanks a lot please find the attachment below.
Title: Re: Database error when attempting to publish post
Post by: margarett on June 24, 2016, 04:42:52 AM
Did you have the MOD "Hide Post" installed before?
Title: Re: Database error when attempting to publish post
Post by: peterwaalker on June 24, 2016, 04:25:54 PM
Quote from: margarett on June 24, 2016, 04:42:52 AM
Did you have the MOD "Hide Post" installed before?


I attach herewith the list of mods installed and uninstalled. I do not have the mod "Hide Post" installed before. However i have this mod called "Hide Tag Special" installed which i use to hide some post content. please take a look
Thanks for helping me
Title: Re: Database error when attempting to publish post
Post by: peterwaalker on June 25, 2016, 07:28:47 AM
I dont know if this could help
MySQL "Server version: 5.6.30 "
Title: Re: Database error when attempting to publish post
Post by: margarett on June 25, 2016, 07:40:23 AM
Not really as the problem is identified. I just need time to pick up the computer...
Title: Re: Database error when attempting to publish post
Post by: peterwaalker on June 26, 2016, 08:55:45 AM
Quote from: margarett on June 25, 2016, 07:40:23 AM
Not really as the problem is identified. I just need time to pick up the computer...

Is there a way i could manage to solve this problem so as to main reduce complaints lodged by members of the forum. For ten days now everybody on the forum are complaining that they cant make fresh post or reply on any topic. This has come to a level that pressure is on the admin to resolve the issue once and for all.
Please help me. Tnx
Title: Re: Database error when attempting to publish post
Post by: peterwaalker on June 26, 2016, 07:23:36 PM
See if this attachment could help

[edit] attachment removed due to license. it does not allow redistribution.
Title: Re: Database error when attempting to publish post
Post by: binaymana on June 27, 2016, 05:36:38 AM
I have the same problem. My forum members also having the same issue.
Title: Re: Database error when attempting to publish post
Post by: margarett on June 27, 2016, 07:47:18 AM
I'm pretty sure that the field does come from the MOD "Hide Post". You might not have it now but you probably did sometime in the past. Hide Tag Special does not seem to create a "hiddenInfo" column.

Put your forum in maintenance mode, backup your database (DON'T SKIP THIS!), go to your database in phpmyadmin and run the following query in the "SQL" tab
ALTER TABLE smf_messages DROP COLUMM hiddenInfo
Then test your forum as much as you can. I'm confident you won't get any more errors but better safe than sorry ;)
Title: Re: Database error when attempting to publish post
Post by: peterwaalker on June 27, 2016, 04:51:58 PM
Quote from: margarett on June 27, 2016, 07:47:18 AM
I'm pretty sure that the field does come from the MOD "Hide Post". You might not have it now but you probably did sometime in the past. Hide Tag Special does not seem to create a "hiddenInfo" column.

Put your forum in maintenance mode, backup your database (DON'T SKIP THIS!), go to your database in phpmyadmin and run the following query in the "SQL" tab
ALTER TABLE smf_messages DROP COLUMM hiddenInfo
Then test your forum as much as you can. I'm confident you won't get any more errors but better safe than sorry ;)


I now agree with you that i installed 'hidepost' in the past(precisely April 2013). And because the installation did not went fine, i uninstalled it and later installed "hide tag special". I found out when i checked the cpanel/home/user/public_html/Packages/2013-04-30_backup_HidePost_1-1_smf20.tar

However, i have backed-up database as you directed and run the query in the "SQL" tab and i got this message "#1046 - No database selected" see the image below for full description.

Thanks for your help. I'm waiting for your direction
Title: Re: Database error when attempting to publish post
Post by: Illori on June 27, 2016, 05:18:02 PM
you need to click into the SMF database on the left side first then run the query.
Title: Re: Database error when attempting to publish post
Post by: peterwaalker on June 27, 2016, 05:37:23 PM
Quote from: Illori on June 27, 2016, 05:18:02 PM
you need to click into the SMF database on the left side first then run the query.

I have now clicked on the waalker_web at the left side before runing the query in the "SQL" tab but i got an error. i think the snap shot below will be better to describe this error. tnx
Waiting for your direction
Title: Re: Database error when attempting to publish post
Post by: Shambles on June 27, 2016, 06:08:10 PM
It's COLUMN not COLUMM
Title: Re: Database error when attempting to publish post
Post by: margarett on June 27, 2016, 06:15:47 PM
Ups :P
Title: Re: Database error when attempting to publish post
Post by: Shambles on June 27, 2016, 06:31:19 PM
Quote from: margarett on June 27, 2016, 06:15:47 PM
Ups :P

It's OOPS not UPS  8) :P O:) ;) ;)
Title: Re: Database error when attempting to publish post
Post by: peterwaalker on June 27, 2016, 07:18:04 PM
Quote from: peterwaalker on June 27, 2016, 04:51:58 PM
Quote from: margarett on June 27, 2016, 07:47:18 AM
I'm pretty sure that the field does come from the MOD "Hide Post". You might not have it now but you probably did sometime in the past. Hide Tag Special does not seem to create a "hiddenInfo" column.

Put your forum in maintenance mode, backup your database (DON'T SKIP THIS!), go to your database in phpmyadmin and run the following query in the "SQL" tab
ALTER TABLE smf_messages DROP COLUMM hiddenInfo
Then test your forum as much as you can. I'm confident you won't get any more errors but better safe than sorry ;)


I now agree with you that i installed 'hidepost' in the past(precisely April 2013). And because the installation did not went fine, i uninstalled it and later installed "hide tag special". I found out when i checked the cpanel/home/user/public_html/Packages/2013-04-30_backup_HidePost_1-1_smf20.tar

However, i have backed-up database as you directed and run the query in the "SQL" tab and i got this message "#1046 - No database selected" see the image below for full description.

Thanks for your help. I'm waiting for your direction

Quote from: Shambles on June 27, 2016, 06:08:10 PM
It's COLUMN not COLUMM

Thanks a lot @margarett. My room cannot contain me any more due to out burst of happiness. Thanks a lot and a million times. May God bless you much more than you have asked in your prayers. You are a genius. Even when i have forgotten that i once upon a time installed that mod, you became insistent because you carried out your analysis correctly.
Thanks