Error when sending PM Field 'message_edit_reason' doesn't ha

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
MikeWebaloo
Registered User
Posts: 3
Joined: Tue Sep 22, 2009 7:27 pm

Error when sending PM Field 'message_edit_reason' doesn't ha

Post by MikeWebaloo » Tue Sep 22, 2009 7:31 pm

Hello,

This is a problem I'm having when sending a PM. I upgraded this forum from 3.02 to 3.05 and ran the upgrade fix indicated by searching the forums. I received this error earlier when posting a new topic but the "fix" fixed that. The error I'm getting looks like this:

General Error
SQL ERROR [ mysql4 ]

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

SQL

INSERT INTO phpbb_privmsgs (root_level, author_id, icon_id, author_ip, message_time, enable_bbcode, enable_smilies, enable_magic_url, enable_sig, message_subject, message_text, message_attachment, bbcode_bitfield, bbcode_uid, to_address, bcc_address) VALUES (0, '2', 0, '65.44.178.211', 1253647699, 1, 1, 1, 0, 'tes', 'test', 0, '', '33z17efy', 'u_110', '')

BACKTRACE

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

FILE: includes/functions_privmsgs.php
LINE: 1435
CALL: dbal_mysql->sql_query()

FILE: includes/ucp/ucp_pm_compose.php
LINE: 733
CALL: submit_pm()

FILE: includes/ucp/ucp_pm.php
LINE: 126
CALL: compose_pm()

FILE: includes/functions_module.php
LINE: 507
CALL: ucp_pm->main()

FILE: ucp.php
LINE: 320
CALL: p_master->load_active()
Last edited by D¡cky on Wed Sep 23, 2009 11:16 pm, edited 1 time in total.
Reason: Topic icon changed

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: Error when sending PM Field 'message_edit_reason' doesn't ha

Post by D¡cky » Wed Sep 23, 2009 4:49 am

Without knowing what "fix" you have already applied, try this, Doesn't have a default value errors
Have you hugged someone today?

MikeWebaloo
Registered User
Posts: 3
Joined: Tue Sep 22, 2009 7:27 pm

Re: Error when sending PM Field 'message_edit_reason' doesn't ha

Post by MikeWebaloo » Wed Sep 23, 2009 5:20 pm

Yeah, that's "the fix" that I installed earlier. I used the 3.02 upgrade package.

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: Error when sending PM Field 'message_edit_reason' doesn't ha

Post by D¡cky » Wed Sep 23, 2009 6:03 pm

Possibly the "fix" didn't take for some reason.

Using phpMyAdmin, enter the following code into the SQL tab window. If your table prefix is not phpbb_ change accordingly.

Code: Select all

ALTER TABLE phpbb_privmsgs
MODIFY msg_id mediumint(8) UNSIGNED NOT NULL auto_increment,
MODIFY root_level mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY author_ip varchar(40) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY message_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
MODIFY enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
MODIFY enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
MODIFY enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
MODIFY message_subject varchar(255) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY message_text mediumtext NOT NULL COLLATE utf8_bin,
MODIFY message_edit_reason varchar(255) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY bbcode_bitfield varchar(255) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY bbcode_uid varchar(8) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY to_address text NOT NULL COLLATE utf8_bin,
MODIFY bcc_address text NOT NULL COLLATE utf8_bin,
DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
When completed, look at the structure of the phpbb_privmsgs table. The message_edit_reason column should have the Null field set to No and the Default column should be blank.
Have you hugged someone today?

MikeWebaloo
Registered User
Posts: 3
Joined: Tue Sep 22, 2009 7:27 pm

Re: Error when sending PM Field 'message_edit_reason' doesn't ha

Post by MikeWebaloo » Wed Sep 23, 2009 9:07 pm

Thanks a lot Dicky, that did the trick!

Locked

Return to “[3.0.x] Support Forum”