Field 'topic_last_poster_name' doesn't have a default value

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Get Involved
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
User avatar
Black Antitoon
Registered User
Posts: 219
Joined: Mon Dec 25, 2006 12:12 pm
Contact:

Field 'topic_last_poster_name' doesn't have a default value

Post by Black Antitoon » Tue Oct 30, 2007 6:35 pm

Hello.

I get a general error when I try to open a new topic:

Errore generale
SQL ERROR [ mysqli ]

Field 'topic_last_poster_name' doesn't have a default value [1364]

SQL

INSERT INTO phpbb3_topics (topic_poster, topic_time, forum_id, icon_id, topic_approved, topic_title, topic_first_poster_name, topic_first_poster_colour, topic_type, topic_time_limit, topic_attachment) VALUES (3, 1193768806, 1, 0, 1, 'Prova', 'Black Antitoon', 'AA0000', 0, 0, 0)

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 143
CALL: dbal->sql_error()

FILE: includes/functions_posting.php
LINE: 1807
CALL: dbal_mysqli->sql_query()

FILE: posting.php
LINE: 1003
CALL: submit_post()




If I try to reply to an existing topic, I get:

Errore generale
SQL ERROR [ mysqli ]

Field 'post_edit_reason' doesn't have a default value [1364]

SQL

INSERT INTO phpbb3_posts (forum_id, poster_id, icon_id, poster_ip, post_time, post_approved, enable_bbcode, enable_smilies, enable_magic_url, enable_sig, post_username, post_subject, post_text, post_checksum, post_attachment, bbcode_bitfield, bbcode_uid, post_postcount, post_edit_locked, topic_id) VALUES (0, 3, 0, '62.94.208.100', 1193768872, 1, 1, 1, 1, 1, '', 'Re: Politica del forum riguardo le elezioni scolastiche', 'Doesn\'t work...', '35b4319926879f3056087d92ef842d64', 0, '', '2k4uyaa6', 1, 0, 1176)

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 143
CALL: dbal->sql_error()

FILE: includes/functions_posting.php
LINE: 1828
CALL: dbal_mysqli->sql_query()

FILE: posting.php
LINE: 1003
CALL: submit_post()

Sometimes when I reply to a post, instead of giving this error, it just reloads the topic without saying that my post has been submitted successfully and without adding my post.


Editing posts works fine. What can I do?




Your board's URL: hasn't an URL yet
Version of phpBB3: 3.0 RC7
Was this a fresh install or a(n) update/upgrade/conversion (please be specific)? Conversion from phpbb 2 to RC1, kept up to date till RC7
Was this an install through your host? After the conversion, the board was moved, and I am experiencing trouble after moving
MODs you have installed: none
When the problem started: Now
Template: FiSubIce2 RC7, but happens with proSilver too
Languages: Italian (unofficial self-made translation), English, happens with both
PHP: 5.2.3
Database: MySQL(i) 5.0.15

Please help!

Thank you!
Do you recognise my avatar? :)

Kandria
Registered User
Posts: 1
Joined: Thu Jul 26, 2007 11:48 pm

Re: Field 'topic_last_poster_name' doesn't have a default value

Post by Kandria » Wed Oct 31, 2007 2:00 am

I am also getting this same problem I have tried a fresh install and it refuses to go away, I was doing fine on RC3 and RC5 (two different boards)

when I upgraded to RC7 This started

pipemann
Registered User
Posts: 31
Joined: Tue Aug 14, 2007 7:41 am
Location: Norway
Contact:

Re: Field 'topic_last_poster_name' doesn't have a default value

Post by pipemann » Wed Nov 07, 2007 6:42 pm

I have exactly the same problem.

PM

User avatar
Black Antitoon
Registered User
Posts: 219
Joined: Mon Dec 25, 2006 12:12 pm
Contact:

Re: Field 'topic_last_poster_name' doesn't have a default value

Post by Black Antitoon » Thu Nov 08, 2007 1:04 pm

I have found a solution (actually euthymos did). I don't know if this has any side-effects, but it works.

You must access the database with phpmyadmin, browse all tables' structure and set all binary fields (blob, mediumblob, tinyblob and so on) to NULL. After this it should work fine.
Do you recognise my avatar? :)

User avatar
Kellanved
Former Team Member
Posts: 2635
Joined: Wed Jan 26, 2005 2:48 pm
Location: Meta-level

Re: Field 'topic_last_poster_name' doesn't have a default value

Post by Kellanved » Thu Nov 08, 2007 1:09 pm

See here:
http://www.phpbb.com/community/viewtopi ... &p=3195403

Changing the fields to NULL manually is not recommended.
Nocando is in Idontwanna county. No support via PM

DareToDebate
Registered User
Posts: 10
Joined: Mon Dec 10, 2007 10:04 pm

Re: Field 'topic_last_poster_name' doesn't have a default value

Post by DareToDebate » Mon Feb 25, 2008 5:45 am

Well, my forum was working perfectly fine yesterday and today every time I (or any of my users) try to post something we get this error:

Code: Select all

General Error
SQL ERROR [ mysql4 ]

Field 'topic_last_poster_name' doesn't have a default value [1364]

SQL

INSERT INTO phpbb_topics (topic_poster, topic_time, forum_id, icon_id, topic_approved, topic_title, topic_first_poster_name, topic_first_poster_colour, topic_type, topic_time_limit, topic_attachment) VALUES (53, 1203917583, 5, 0, 1, 'test', 'DareToDebate', '', 0, 0, 0)

BACKTRACE

FILE: includes/db/mysql.php
LINE: 158
CALL: dbal_mysql->sql_error()

FILE: includes/functions_posting.php
LINE: 1809
CALL: dbal_mysql->sql_query()

FILE: posting.php
LINE: 1002
CALL: submit_post()
:-/ My server (ipowerweb) just recently switched us to the new vdeck control panel, could that be what is causing the trouble? Is there any way I can get my forum back online? (Without changing the binary fields to NULL?)

Thanks!

DareToDebate
Registered User
Posts: 10
Joined: Mon Dec 10, 2007 10:04 pm

Re: Field 'topic_last_poster_name' doesn't have a default value

Post by DareToDebate » Wed Feb 27, 2008 9:34 pm

Bump

Since my first post, I was able to do a little digging and I ran this script:
http://www.phpbb.com/kb/article/doesnt- ... ue-errors/

However, when I follow the instructions and run the queries via phpbbmyadmin, I get this error:

Code: Select all

#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=utf8 COLLATE=utf8_bin' at line 7
I am pretty clueless as to what this means. :-/ Any help would be extremely appreciated. My forum is virtually unusable at this point :-(

Thank you in advance!

Magiw
Registered User
Posts: 34
Joined: Sun Mar 21, 2004 6:00 pm

Re: Field 'topic_last_poster_name' doesn't have a default value

Post by Magiw » Wed Apr 23, 2008 6:17 pm

Ran this today and it worked great. Thank you!

The person above appears to have had a copy/paste issue or possibly was trying to run all of the scripts from one of the products it said it could not do that. Used PHPMYADMIN, so it let me copy and paste them all into one SQL process.

User avatar
davss
Registered User
Posts: 51
Joined: Fri Dec 14, 2007 12:24 pm
Contact:

Re: Field 'topic_last_poster_name' doesn't have a default value

Post by davss » Fri Jun 06, 2008 3:02 pm

I backed up my DB (full backup) on a running phpBB3.0.0 server downloaded and did full restore on a new server with exactly the same code then stared getting this error message:

General Error
SQL ERROR [ mysql4 ]

Field 'post_edit_reason' doesn't have a default value [1364]

SQL

INSERT INTO phpbb_posts (forum_id, poster_id, icon_id, poster_ip, post_time, post_approved, enable_bbcode, enable_smilies, enable_magic_url, enable_sig, post_username, post_subject, post_text, post_checksum, post_attachment, bbcode_bitfield, bbcode_uid, post_postcount, post_edit_locked, topic_id) VALUES (2, 2, 0, '192.168.1.1', 1190010679, 1, 1, 1, 1, 1, '', 'Re: Alfresco 500 error', 'TYest', '9879acbfeacb7c52e98e51d0dd40fda4', 0, '', 'fe3aa', 1, 0, 1026)

BACKTRACE

FILE: includes/db/mysql.php
LINE: 158
CALL: dbal->sql_error()

FILE: includes/functions_posting.php
LINE: 1813
CALL: dbal_mysql->sql_query()

FILE: posting.php
LINE: 996
CALL: submit_post()

After comparing tables and fields types with another working forum it turned out that they've changed! Not sure when and why??!!

I logged into my MySQL DB and run the following commands:

phpbb_posts

Code: Select all

alter table phpbb_posts MODIFY post_edit_reason varchar(255) DEFAULT '' NOT NULL COLLATE utf8_bin;
alter table phpbb_posts MODIFY post_username varchar(255) DEFAULT '' NOT NULL COLLATE utf8_bin;
alter table phpbb_posts MODIFY post_subject varchar(100) DEFAULT '' NOT NULL COLLATE utf8_bin;
Am checking the rest of the fields in tables... what a pain! All fields that need updating can be found here:

http://www.davss.com/forum/viewtopic.php?f=21&t=6

David
Last edited by davss on Fri Jun 06, 2008 3:14 pm, edited 3 times in total.

User avatar
KevC
Support Team Member
Support Team Member
Posts: 68390
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Field 'topic_last_poster_name' doesn't have a default value

Post by KevC » Fri Jun 06, 2008 3:06 pm

Just follow the KB article linked in the post 2 above yours
http://www.phpbb.com/kb/article/doesnt- ... ue-errors/

It'll output a page of SQL commands to automatically do the changes for you.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

P3S
Registered User
Posts: 3
Joined: Fri Aug 29, 2008 8:13 pm

Re: Field 'topic_last_poster_name' doesn't have a default value

Post by P3S » Sat Aug 30, 2008 10:01 am

I have tried to solve this problem but so far nothing has worked.
I am a complete beginner when it comes to forum software, data bases and any kind of code writing, but I have tried to follow all the steps suggested. This is what I have done;

I had version 3.0.0 and downloaded the appropriate fix.
I deleted the "die" line, uploaded the file and run the script.
Didn't work.

I upgraded my 3.0.0 version to 3.0.2, downloaded the appropriate fix, deleted the "die" line, uploaded the file and run the script.
Didn't work.

Today I realized that I should run the SQL queries generated by the "fix"-file.
I logged in to phpmyadmin (provided by my web hotel) and run the queries. I pasted the queries and run them.
Didn't work.

Have I missed something?

User avatar
karlsemple
Former Team Member
Posts: 39802
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK
Contact:

Re: Field 'topic_last_poster_name' doesn't have a default value

Post by karlsemple » Sat Aug 30, 2008 10:03 am

I upgraded my 3.0.0 version to 3.0.2,
Did you make sure to run the install/database_update.php
Today I realized that I should run the SQL queries generated by the "fix"-file.
I logged in to phpmyadmin (provided by my web hotel) and run the queries. I pasted the queries and run them.
Didn't work.
In what way didn't it work? Did it give you errors, what happened when you ran the queries?
Image

P3S
Registered User
Posts: 3
Joined: Fri Aug 29, 2008 8:13 pm

Re: Field 'topic_last_poster_name' doesn't have a default value

Post by P3S » Sat Aug 30, 2008 10:15 am

karlsemple wrote:
I upgraded my 3.0.0 version to 3.0.2,
Did you make sure to run the install/database_update.php
Yes. I logged in later as an administrator and checked that the software had been upgraded.
Today I realized that I should run the SQL queries generated by the "fix"-file.
I logged in to phpmyadmin (provided by my web hotel) and run the queries. I pasted the queries and run them.
Didn't work.
In what way didn't it work? Did it give you errors, what happened when you ran the queries?[/quote]

I still get the same error message when I try to post new topics.

When I run the queries I got following messages;

SQL-query:

# Table: 'phpbb_groups'
ALTER TABLE phpbb_groups MODIFY group_id mediumint( 8 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
MODIFY group_type tinyint( 4 ) DEFAULT '1' NOT NULL ,
MODIFY group_founder_manage tinyint( 1 ) UNSIGNED DEFAULT '0' NOT NULL ,
MODIFY group_name varchar( 255 ) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY group_desc text NOT NULL COLLATE utf8_bin,
MODIFY group_desc_bitfield varchar( 255 ) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY group_desc_options int( 11 ) UNSIGNED DEFAULT '7' NOT NULL ,
MODIFY group_desc_uid varchar( 8 ) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY group_display tinyint( 1 ) UNSIGNED DEFAULT '0' NOT NULL ,
MODIFY group_avatar varchar( 255 ) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY group_avatar_type tinyint( 2 ) DEFAULT '0' NOT NULL ,
MODIFY group_avatar_width smallint( 4 ) UNSIGNED DEFAULT '0' NOT NULL ,
MODIFY group_avatar_height smallint( 4 ) UNSIGNED DEFAULT '0' NOT NULL ,
MODIFY group_rank mediumint( 8 ) UNSIGNED DEFAULT '0' NOT NULL ,
MODIFY group_colour varchar( 6 ) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY group_sig_chars mediumint( 8 ) UNSIGNED DEFAULT '0' NOT NULL ,
MODIFY group_receive_pm tinyint( 1 ) UNSIGNED DEFAULT '0' NOT NULL ,
MODIFY group_message_limit mediumint( 8 ) UNSIGNED DEFAULT '0' NOT NULL ,
MODIFY group_legend tinyint( 1 ) UNSIGNED DEFAULT '1' NOT NULL ,
DROP INDEX group_legend_name,
ADD KEY group_legend_name( group_legend, group_name ) ,
DEFAULT CHARSET = utf8 COLLATE = utf8_bin

MySQL said:
#1091 - Can't DROP 'group_legend_name'; check that column/key exists

User avatar
karlsemple
Former Team Member
Posts: 39802
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK
Contact:

Re: Field 'topic_last_poster_name' doesn't have a default value

Post by karlsemple » Sat Aug 30, 2008 10:18 am

In the sql it gave you to run remove this line before submitting into phpmyadmin

Code: Select all

DROP INDEX group_legend_name,
and then try again :)
Image

P3S
Registered User
Posts: 3
Joined: Fri Aug 29, 2008 8:13 pm

Re: Field 'topic_last_poster_name' doesn't have a default value

Post by P3S » Sat Aug 30, 2008 10:35 am

Thank you very much!!

I managed to post a new topic without any error messages.

Locked

Return to “[3.0.x] Support Forum”

Who is online

Users browsing this forum: No registered users and 76 guests