Can't post since RC4 to RC5 update

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)
Locked
matt74uk
Registered User
Posts: 2
Joined: Sat Aug 25, 2007 8:05 am

Can't post since RC4 to RC5 update

Post by matt74uk »

Version of phpBB3: RC5
Was this a fresh install or a(n) update/upgrade/conversion (please be specific)? Upgrade from RC4 to RC5
Was this an install through your host? No
MODs you have installed: None (except the CSS thing to move avatars to the left)
When the problem started: After upgrade

Additionally, you may wish to provide the following (where applicable)
Template(s) used: Prosilver
Language(s) used: English
Version of PHP used: not sure
Database and version used: MySQL 5.0.27-standard

Code: Select all

General Error
SQL ERROR [ mysql4 ]

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 (10361, 1188029446, 25, 0, 1, 'test', 'Matt Clarke', 'AA0000', 0, 0, 0)

BACKTRACE


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

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

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

Update_database.php seemed to run successfully, Username cleaning worked when that bit was running and returned a successful message as did the others.
Last edited by matt74uk on Sun Sep 14, 2008 9:04 pm, edited 1 time in total.
jklnl65
Registered User
Posts: 15
Joined: Fri Apr 20, 2007 8:01 am

Re: Can't post since RC4 to RC5 update

Post by jklnl65 »

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

Re: Can't post since RC4 to RC5 update

Post by karlsemple »

Might be worth filing a bug report on this one :)
Image
User avatar
Algore
Registered User
Posts: 294
Joined: Tue Oct 24, 2006 10:19 am

Re: Can't post since RC4 to RC5 update

Post by Algore »

It might be a bug
Mickey14
Registered User
Posts: 88
Joined: Sat Mar 05, 2005 10:45 am

Re: Can't post since RC4 to RC5 update

Post by Mickey14 »

I had the same, when replying to a post, but with the post_edit_reason field. I needed to set the "can be null" propertiy to the field. PHP Version 5.1.6 and mysql 5.0.27
User avatar
karlsemple
Former Team Member
Posts: 39802
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK
Contact:

Re: Can't post since RC4 to RC5 update

Post by karlsemple »

Mickey14 wrote:I had the same, when replying to a post, but with the post_edit_reason field. I needed to set the "can be null" propertiy to the field. PHP Version 5.1.6 and mysql 5.0.27

yes but it is still something which should be bug reported :) as the devs might want to allow for this in the next release so please report it :)
Image
Mickey14
Registered User
Posts: 88
Joined: Sat Mar 05, 2005 10:45 am

Re: Can't post since RC4 to RC5 update

Post by Mickey14 »

I'll do it immediately.

The strange thing is that it seems to happen on various field, and various installations differently :(
derDiesel
Registered User
Posts: 7
Joined: Sat Mar 25, 2006 2:18 pm

Re: Can't post since RC4 to RC5 update

Post by derDiesel »

Hey,
I had the same problem, it caused by missing " default '', " in the structure and affected PM, posting, topic... (and maybe more?)

To fix the problem, export your affected tables and change the structure!

example for "phpbb_posts":

Code: Select all

CREATE TABLE IF NOT EXISTS `phpbb_posts` (
  `post_id` mediumint(8) unsigned NOT NULL auto_increment,
  `topic_id` mediumint(8) unsigned NOT NULL default '0',
  `forum_id` mediumint(8) unsigned NOT NULL default '0',
  `poster_id` mediumint(8) unsigned NOT NULL default '0',
  `icon_id` mediumint(8) unsigned NOT NULL default '0',
  `poster_ip` varchar(40) collate utf8_bin NOT NULL default '',
  `post_time` int(11) unsigned NOT NULL default '0',
  `post_approved` tinyint(1) unsigned NOT NULL default '1',
  `post_reported` tinyint(1) unsigned NOT NULL default '0',
  `enable_bbcode` tinyint(1) unsigned NOT NULL default '1',
  `enable_smilies` tinyint(1) unsigned NOT NULL default '1',
  `enable_magic_url` tinyint(1) unsigned NOT NULL default '1',
  `enable_sig` tinyint(1) unsigned NOT NULL default '1',
  `post_username` varchar(255) collate utf8_bin NOT NULL default '',
  `post_subject` varchar(100) character set utf8 collate utf8_unicode_ci NOT NULL default '',
  `post_text` mediumtext character set utf8 collate utf8_unicode_ci NOT NULL,
  `post_checksum` varchar(32) collate utf8_bin NOT NULL default '',
  `post_attachment` tinyint(1) unsigned NOT NULL default '0',
  `bbcode_bitfield` varchar(255) collate utf8_bin NOT NULL default '',
  `bbcode_uid` varchar(5) collate utf8_bin NOT NULL default '',
  `post_postcount` tinyint(1) unsigned NOT NULL default '1',
  `post_edit_time` int(11) unsigned NOT NULL default '0',
  `post_edit_reason` varchar(255) collate utf8_bin NOT NULL default '',
  `post_edit_user` mediumint(8) unsigned NOT NULL default '0',
  `post_edit_count` smallint(4) unsigned NOT NULL default '0',
  `post_edit_locked` tinyint(1) unsigned NOT NULL default '0',
  PRIMARY KEY  (`post_id`),
  KEY `forum_id` (`forum_id`),
  KEY `topic_id` (`topic_id`),
  KEY `poster_ip` (`poster_ip`),
  KEY `poster_id` (`poster_id`),
  KEY `post_approved` (`post_approved`),
  KEY `tid_post_time` (`topic_id`,`post_time`),
  FULLTEXT KEY `post_subject` (`post_subject`),
  FULLTEXT KEY `post_text` (`post_text`),
  FULLTEXT KEY `post_content` (`post_subject`,`post_text`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=YOURNUMBER ;
Than comes your normal entries...

Code: Select all

INSERT INTO `phpbb_posts` (`post_id`, `topic_id`, `forum_id`, `poster_id`, ...
Do this for phpbb_posts, phpbb_privmsgs, phpbb_topics (And all maybe other effected tables)

You can get the original structure from a fresh phpbb3-installation. Its strongly recommended to repair all affected tables. (Approx 50)

The problem is caused by the MySQL4 > MySQL5 converter. On my phpbb3-boards utf8 was changed too latin1 (The search-index worked not longer) and the converter deleted all " default '', ". Its easy to fix the problems, you must only get the original structure from a fresh phpbb3-installation and repair your sql-data scheme...

More informations:
http://www.phpbb.com/bugs/phpbb3/ticket ... t_id=14244
matt74uk
Registered User
Posts: 2
Joined: Sat Aug 25, 2007 8:05 am

Re: Can't post since RC4 to RC5 update

Post by matt74uk »

I took a structure only backup using the maintainence utilities and then deleted the database. Did a clean install of RC5 creating a new database, then reimported the backup so the data went back in with a correctly running schema. No fiddling with mySQL tables or anything then as that's all a bit beyond me:)

Everything is now working.

Presumably not actually a RC5 problem but I assume my host upgraded to mySQL5 and buggered up the database, but it wasn't apparent until the RC5 upgrade was run?
User avatar
johnesku
Registered User
Posts: 86
Joined: Wed Jul 16, 2003 9:22 am
Location: Bucharest, RO
Contact:

Re: Can't post since RC4 to RC5 update

Post by johnesku »

Same problem with user_from which didn't have a default value:
Solved with

Code: Select all

ALTER TABLE `phpbb_users` CHANGE `user_from` `user_from` VARCHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ' ' 
Mozart4eva
Registered User
Posts: 16
Joined: Wed Oct 12, 2005 11:51 am

Re: Can't post since RC4 to RC5 update

Post by Mozart4eva »

I had the user_from error too and the above worked for me. Now when I attempt to register on my forum it gives this new error:

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

Could someone please tell me what to do with that?

Also, for these "no default value" errors is there not some easily adjusted query for each problem field? Like in the code above, might I just change `user_from` to `user_aim`? I guess no, that would be bad?
Mozart4eva
Registered User
Posts: 16
Joined: Wed Oct 12, 2005 11:51 am

Re: Can't post since RC4 to RC5 update

Post by Mozart4eva »

I searched again and I still can't find an answer for this particular problem. The error I'm receiving is:
Field 'user_aim' doesn't have a default value [1364]
Can anyone help me with that, please...
User avatar
johnesku
Registered User
Posts: 86
Joined: Wed Jul 16, 2003 9:22 am
Location: Bucharest, RO
Contact:

Re: Can't post since RC4 to RC5 update

Post by johnesku »

Use a database administration software (such as phpMyadmin) to alter your database.

Try this:

Code: Select all

ALTER TABLE `phpbb_users` CHANGE `user_aim` `user_aim` VARCHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ' ';
Post here if your problem was solved.
Mozart4eva
Registered User
Posts: 16
Joined: Wed Oct 12, 2005 11:51 am

Re: Can't post since RC4 to RC5 update

Post by Mozart4eva »

Thank you so much. It is working now. After I entered the query you gave I received a similar error for 'user_yim' when I tried to register. I changed the 'user_aim' part to 'user_yim' in the code you gave and ran that query successfully. I then did this a few more times for the three or four different errors I received when trying to complete registration (all related to the profile fields - msn, website and such), and now it all works. Everything is good now.

Thanks again for your help, I really appreciate it.
Locked

Return to “[3.0.x] Support Forum”