MyBB Community Forums

Full Version: The subject for your message is too long
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi, I'm from China, I think because chinese character size are big than english letters. when I want to post a thread , mybb show me this error:
Quote:We are sorry but we cannot process your request because the subject for your message is too long.
I think it's because my thread title's length out of board setting. but where I can en-large this setting. It's shoulb be in board setting->posting, anyone can tell me the exactly where I can fix this problem.

Thanks
anyone Smile
On newthread.php starting on line 424:

	if(!$mybb->input['savedraft'] || !$mybb->user['uid'])
	{
		if(trim($mybb->input['subject']) == "")
		{
			error($lang->error_nosubject);
		}
		if(strlen(trim($mybb->input['subject'])) > 85)
		{
			error($lang->error_subjecttolong);
		}
		if(strlen(trim($mybb->input['message'])) == 0)
		{
			error($lang->error_nomessage);
		}

Substitute 85 for how long you want thread titles to be allowed. There isn't a setting in the admin panel, you must change it via editting newthread.php

- Dan
If you change the limit in newthread.php, be sure that your database field is large enough too.
Yeah I'll check that now.

EDIT: Subject field for threads is VARCHAR(120). So You can change that PHP thing to whatever you want, say 255.

And then run this in a php script or in phpmyadmin:

ALTER TABLE mybb_threads CHANGE subject subject VARCHAR( 255 ) NOT NULL ;

Make sure where it says mybb_threads to change it to your table prefix_threads.

- Dan
Thanks Copernicus and laie_techie Smile
It's worked. now I can post these thread, but another problem come outSad
the thread title can not showed whole in the forum thread list. Can you tell me is there another code page need change.
I think it's must cause i need change the all correlative code page in this setting.
Gavin_wangjz Wrote:Thanks Copernicus and laie_techie Smile
It's worked. now I can post these thread, but another problem come outSad
the thread title can not showed whole in the forum thread list. Can you tell me is there another code page need change.
I think it's must cause i need change the all correlative code page in this setting.


If you use Copernicus's SQL code, you are still limited to a 255 character subject. You can't go over that with the MyBB limit. The rest of it will get chopped off by MySQL.
Well yeah I assumed 255 was enough, if not change VARCHAR( 255) to TEXT.
My forum server used mysql database. still not clear, is it can be fixed. Chinese character just big than english letter. 255 or 300 will be enough
Quote:1 chinese character = 4 english letter
Well VARCHAR cannot go past 255. So use this if you need longer.

ALTER TABLE mybb_threads CHANGE subject subject TEXT NOT NULL ;
Pages: 1 2