Increase the 50 Character forum title limit

First off, I would always recommend that if you can't write file edits for yourself, don't use file edits. Same goes for queries.

That said if you have a clone of your site to test things on....


Do both bullets:

  • MySQL Query:

Code:
ALTER TABLE `xf_node` MODIFY title varchar(100), MODIFY node_name varchar(100);

- - - - - - - - - - - - - - - - - - - - - - - - - - - -

  • File Edit:

library/XenForo/DataWriter/Node.php
@ line: 59

Find:
PHP:
  'title'              => array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 50,

Replace/Edit: ('maxLength' => NUMERIC_VALUE)
PHP:
  'title'              => array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 100,


@ line: 62

Find:
PHP:
  'node_name'          => array('type' => self::TYPE_STRING, 'default' => null, 'verification' => array('$this', '_verifyNodeName'), 'maxLength' => 50),

Replace/Edit: ('maxLength' => NUMERIC_VALUE)
PHP:
  'node_name'          => array('type' => self::TYPE_STRING, 'default' => null, 'verification' => array('$this', '_verifyNodeName'), 'maxLength' => 100),


I have not tested it through an upgrade but when you do update xf you will have to redo the file edit with the possibility of having to redo the query as well (not sure if XF upgrades touch that).​
 
Generally at this forum, the staff uses the count of likes given to the original post to gauge interest of it. If you support the suggestion, I suggest liking the first post.
Thanks for telling me that, I never saw this on other forums, on these there were Support/Neutral/No Support ratings
 
For xf 2 you have to look at file

/src/XF/Entity/Node.php

find row

PHP:
        $structure->columns = [
            'node_id' => ['type' => self::UINT, 'autoIncrement' => true, 'nullable' => true],
            'title' => ['type' => self::STR, 'maxLength' => 50,
                'required' => 'please_enter_valid_title'
            ],

and change to

PHP:
        $structure->columns = [
            'node_id' => ['type' => self::UINT, 'autoIncrement' => true, 'nullable' => true],
            'title' => ['type' => self::STR, 'maxLength' => 100,
                'required' => 'please_enter_valid_title'
            ],
 
For xf 2 you have to look at file

/src/XF/Entity/Node.php

find row

PHP:
        $structure->columns = [
            'node_id' => ['type' => self::UINT, 'autoIncrement' => true, 'nullable' => true],
            'title' => ['type' => self::STR, 'maxLength' => 50,
                'required' => 'please_enter_valid_title'
            ],

and change to

PHP:
        $structure->columns = [
            'node_id' => ['type' => self::UINT, 'autoIncrement' => true, 'nullable' => true],
            'title' => ['type' => self::STR, 'maxLength' => 100,
                'required' => 'please_enter_valid_title'
            ],
Nice, is this working for xenforo 2.2?
 
Top Bottom