miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Search | Statistics | Manual |
Bugs miniBB Support Forums / Bugs /   

Very First Post - 'topic_last_post_time' doesn't have a default value

Author mikeynma
#1 | Posted: 25 Oct 2005 18:11 

Hello :D

I have created a test mini forum but the first time I post to it I get this error

Field 'topic_last_post_time' doesn't have a default value. Please, try another name or value.

How and where do I set this value or is it a deeper problem?

thanks for any help



Author Team
#2 | Posted: 25 Oct 2005 20:00 
There is some problem with your database. Try to re-install the board, completely removing the previous database.

Author marcp
#3 | Posted: 26 Dec 2005 07:22 
I had the same problem and this solution did not work. Instead, I had to go to the _topics table and give field "topic_last_post_time" a default value zero 0 (which makes a timestamp).

Author Team
#4 | Posted: 26 Dec 2005 15:03 
Oh... you are right.

Maybe you could add another value... like "topic_last_post_time datetime not null default '0000-00-00 00:00:00'".

In general, it would be interesting, how this problem has come. Do you have any plugins installed? As far as I know, this field's value is always mentioned in default SQL requests.

Author Anonymous
#5 | Posted: 7 Jan 2006 01:34 
My guess you are using MySQL 5.0

Author otto
#6 | Posted: 11 Dec 2006 23:17 | Edited by: otto 
I upgraded and got the problem too. Whythis problem has come? I don't know but I use MySQL 5.0.22.
I downloaded my database, converted it and instead of using my old templates (which I had done a hell of work on) I started changing the new ones.
Among others I changed on last discussions page and on topic page the order 1. replies 2.Views 3.Author 4.Latest reply to and cut off the hour and seconds.
I tried nearly everything again and again and validated with w3c. All seamed fine and all my old groups, messages etc were intact
I then went on and installed Captcha, but now I understood that I had forgotten the important thing to try to post! I discovered now thaT I couldn't.
Naturally I thought that I had done something wrong with Captcha, but as I could not find any failure I uninstalled it.
Still I could not post so I was sure I had done a mistake by my messing around and began changing 'my'own' templates back to the originals one by one.
It did not help and I then took the whole original MiniBB instead of 'my own' and everything worked as before with my data etc. and there was still something wrong.
I found that both in the original and in 'my own' I could post answers to a topic but that I could not post a new topic.
When I try to post a new topic I get exactly the same message Field 'topic_last_post_time' doesn't have a default value.
So, what to do now?
The solution above seems simple, but what is the _topics table? Where exactly shall I put the code?
I can't find field "topic_last_post_time in main_topic or in main_topic_cell. I can only find it in 4 files (Bbfunc_pthread_ , Bbfunc_delmsg , Bb_admin and in _install_mysql).
Again, whythis problem has come? I don't know and suddently I can't remember what I did in the first place. I know that I used the upgrade database thing but I don't think (but can't remember) that I used _install:mysql at all and in which you see' the solution' topic_last_post_time datetime not null default '0000-00-00 00:00:00'".
Anyway, it looks for me as my database is quite correct, I mean all the stuff with the time is there.

Can one of you please show me, a kind of a newbee, precise where I put the solution?

Author Paul
Lead Developer
#7 | Posted: 12 Dec 2006 03:37 | Edited by: Paul 
The solution should be applied to your database, not templates. Try to execute the following SQL:

ALTER ignore TABLE minibbtable_topics CHANGE topic_last_post_time topic_last_post_time datetime DEFAULT "0000-00-00 00:00:00" NOT NULL;

Substitute your own topics table name, if you have changed it.

Author otto
#8 | Posted: 13 Dec 2006 09:57 
Everything fine.
Thank you!

Bugs miniBB Support Forums / Bugs / Very First Post - 'topic_last_post_time' doesn't have a default value Top
This topic is closed. New replies are not allowed.
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB