• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 Do not require any content in a post in order to create a new thread.

Dynamic

Well-known member
#1
Hello,

Is there a way to stop the "Please enter a valid message" text giving an error without actually including anything in the post?

Thanks.
 

Dynamic

Well-known member
#5
Hi @Brogan,

This would require the user to need to do this when creating the thread. I would much prefer it if the user need not add a single thing to the editor.
 

Brogan

XenForo moderator
Staff member
#8
A quick search for please_enter_valid_message results in two relevant hits in:

library\XenForo\DataWriter\DiscussionMessage.php
library\XenForo\DataWriter\DiscussionMessage\Post.php
 

Dynamic

Well-known member
#10
Hi everyone,

This one was easy. Thanks to @Brogan for pointing me to that file :)

If anyone else wishes to do this, this is what I did.

Open up library\XenForo\DataWriter\DiscussionMessage.php

Find

Code:
                'message'                => array('type' => self::TYPE_STRING, 'required' => true,
Replace with

Code:
                'message'                => array('type' => self::TYPE_STRING, 'required' => false,