General Error when creating new topics / PM'ing

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
MJG8910
Registered User
Posts: 7
Joined: Mon Mar 16, 2009 2:26 pm

General Error when creating new topics / PM'ing

Post by MJG8910 » Tue Aug 04, 2009 6:29 pm

Hello everyone.
I recently updated my board from 3.01 to 3.05
After doing this, everything seemed ok.
I tried to add the Antibot question to stop the spam posts and again, everything seemed ok except for a problem with how one of the fields displayed.
I then noticed that everytime a NEW topic was created, i got the following message.
General Error
SQL ERROR [ mysql4 ]

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

SQL

INSERT INTO phpbb_topics (topic_poster, topic_time, topic_last_view_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 (2, 1249409966, 1249409966, 1, 0, 1, 'Test', 'mickgrady', '#0F5EF', 0, 0, 0)

BACKTRACE


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

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

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

Adding a post to an existing topic was not affected.

Having seen this problem, i removed the changes for the Antibot question (uploaded original files) in an attempt to get back to square one.
The only thing i've changed to the SQL is the insert of the 4 lines of code needed for the antibot question (which i did through myphphadmin as instructed in the guide, with no errors)
The code was entered into php_config table in my database.

I've tried restoring from a backup made before any alterations but i keep getting a server 500 timeout error.
The data does seem to be restored in spite of the error (posts revert to what they were prior to the backup) but i still get the above General error ONLY when creating new topics, not adding a post to existing ones.

Seriously stuck! hope someone can help
Last edited by MJG8910 on Tue Aug 04, 2009 8:22 pm, edited 1 time in total.

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

Re: General Error when creating new topics

Post by karlsemple » Tue Aug 04, 2009 6:30 pm

Image

MJG8910
Registered User
Posts: 7
Joined: Mon Mar 16, 2009 2:26 pm

Re: General Error when creating new topics

Post by MJG8910 » Tue Aug 04, 2009 7:31 pm

Thanks Karl.
I followed the instructions and manually updated the SQL in all of the 62 tables in the database from the mysql_upgrader report.
I got three errors during the process. (see images below)
The fault i've posted for (not being able to post new topics) seems to have been cured by the input of the data but i'm worried the three that failed php_groups, php_posts, php_profield_fields, may lead to further problems.
I don't understand what i'm supposed to do from the errors listed.

php_groups
Image

php_posts
Image

php_profiel_fields
Image

Thanks again

MJG8910
Registered User
Posts: 7
Joined: Mon Mar 16, 2009 2:26 pm

Re: General Error when creating new topics

Post by MJG8910 » Tue Aug 04, 2009 8:21 pm

Just found another error when attempting to PM someone
General Error
SQL ERROR [ mysql4 ]

Unknown column 'g.group_max_recipients' in 'field list' [1054]

SQL

SELECT MAX(g.group_max_recipients) as max_recipients FROM phpbb_groups g, phpbb_user_group ug WHERE ug.user_id = 2 AND ug.user_pending = 0 AND ug.group_id = g.group_id

BACKTRACE

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

FILE: includes/ucp/ucp_pm_compose.php
LINE: 435
CALL: dbal_mysql->sql_query()

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()

Roberdin
Registered User
Posts: 203
Joined: Sun Nov 24, 2002 3:56 pm
Location: London, United Kingdom

Re: General Error when creating new topics / PM'ing

Post by Roberdin » Tue Aug 04, 2009 8:44 pm

You did run install/update_database.php as well as upload all the new files, right? ;)
Roberdin

MJG8910
Registered User
Posts: 7
Joined: Mon Mar 16, 2009 2:26 pm

Re: General Error when creating new topics / PM'ing

Post by MJG8910 » Wed Aug 05, 2009 1:56 pm

The initial update was done via the automatic update so i presume that ran the update (i remember it having a section where it updated the database)
As said, everything on the update "seemed" to go ok.

I'e definatley not ran the update manually.

I just now have the above three sections of tables i couldn't update manually in SQL as instructed leading to the General error when composing PM's

Roberdin
Registered User
Posts: 203
Joined: Sun Nov 24, 2002 3:56 pm
Location: London, United Kingdom

Re: General Error when creating new topics / PM'ing

Post by Roberdin » Wed Aug 05, 2009 2:36 pm

Goodness knows how you've lost these columns.

Try executing the following SQL statements, which will re-create the fields. I suggest you back-up first, of course. ;)

Code: Select all

ALTER TABLE phpbb_groups ADD COLUMN group_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL;
ALTER TABLE phpbb_profile_fields ADD COLUMN field_show_profile tinyint(1) UNSIGNED DEFAULT '0' NOT NULL;
I don't know about the phpbbb_posts table, alas. Are you using the MySQL full text index for searching? (Check in the ACP > Maintenance > Search Index.)
Roberdin

MJG8910
Registered User
Posts: 7
Joined: Mon Mar 16, 2009 2:26 pm

Re: General Error when creating new topics / PM'ing

Post by MJG8910 » Wed Aug 05, 2009 3:21 pm

I don't know what i've done to lose the columns!

I'll try what you've said.

If fails, can i just re-run the update? (will that just overright everything?) Or will it tell me i'm already running the latest version?

Roberdin
Registered User
Posts: 203
Joined: Sun Nov 24, 2002 3:56 pm
Location: London, United Kingdom

Re: General Error when creating new topics / PM'ing

Post by Roberdin » Wed Aug 05, 2009 3:24 pm

No, the script gave errors because it tried to modify columns that MySQL asserted did not exist.
Roberdin

Locked

Return to “[3.0.x] Support Forum”