Hello everyone, today I'm going to guide you on how to increase the character limit for categories and post titles in Xenforo.
By default, Xenforo only supports 50 characters for categories and 150 characters for post titles. If you exceed these limits, an error will be displayed
Oops! We ran into some problems. Please enter a value using 50 characters or fewer.
To increase the character limit, you'll need to go to phpMyAdmin, navigate to the SQL tab, and execute the following command:
Go to /src/XF/Entity/Node.php
Search for
And change 50 to 500
Go to /src/XF/Entity/Thread.php
Search for:
And change 150 to 500.
Go to /src/XF/Entity/Forum.php
Search for:
And change 150 to 500.
That's it, you're done!
Wishing you success!
By default, Xenforo only supports 50 characters for categories and 150 characters for post titles. If you exceed these limits, an error will be displayed
Oops! We ran into some problems. Please enter a value using 50 characters or fewer.
To increase the character limit, you'll need to go to phpMyAdmin, navigate to the SQL tab, and execute the following command:
SQL:
ALTER TABLE `xf_node` CHANGE COLUMN `title` `title` VARCHAR(500), CHANGE COLUMN `node_name` `node_name` VARCHAR(500);
ALTER TABLE `xf_thread` MODIFY title varchar(500);
ALTER TABLE `xf_forum` MODIFY last_thread_title varchar(500);
Go to /src/XF/Entity/Node.php
Search for
PHP:
$structure->columns = [
'node_id' => ['type' => self::UINT, 'autoIncrement' => true, 'nullable' => true],
'title' => ['type' => self::STR, 'maxLength' => 50,
'required' => 'please_enter_valid_title', 'api' => true
],
'node_name' => ['type' => self::STR, 'maxLength' => 50, 'nullable' => true, 'default' => null,
'unique' => 'node_names_must_be_unique',
'match' => self::MATCH_ALPHANUMERIC_HYPHEN,
'api' => true
],
And change 50 to 500
Go to /src/XF/Entity/Thread.php
Search for:
PHP:
$structure->columns = [
'thread_id' => ['type' => self::UINT, 'autoIncrement' => true, 'nullable' => true],
'node_id' => ['type' => self::UINT, 'required' => true, 'api' => true],
'title' => ['type' => self::STR, 'maxLength' => 150,
'required' => 'please_enter_valid_title',
'censor' => true,
'api' => true,
],
And change 150 to 500.
Go to /src/XF/Entity/Forum.php
Search for:
PHP:
'last_thread_title' => ['type' => self::STR, 'maxLength' => 150, 'default' => ''],
And change 150 to 500.
That's it, you're done!
Wishing you success!
