Any way to allow empty posts?

(JC Ford) #1

I’m converting from a forum where users are accustomed to being able to just type a subject/title. Discourse doesn’t seem to allow that out of the box and requires text in the post body.

Would be great if I could just specify a default body like “-no text-” or if it could just duplicate the Title as the body.

Any support for this? Or plugin?

(Bhanu Sharma) #2

Set the following settings to 0


This should allow you to import/create posts with only title and no body content.

(JC Ford) #3

Do I have to do that in a config file or something? If I try through the admin interface it won’t accept a value < 1

(Bhanu Sharma) #4

@pfaffman Is there a way to overcome the internal fail safe of discourse? maybe by using rails console or something? I’m not really sure and couldn’t find anything relevant if a setting can be set to a value outside of the min & max limits without ultimately breaking everything?

(JC Ford) #5

Might be something that requires a plugin. Simplest would probably be one that lets you set a default message body for posts where it’s left empty.

Replies should obviously require text in the body since they can’t have their own title.

(Bhanu Sharma) #6

That maybe achieved with a simple hack: setting the min values to 1 and then appending something like &nbsp; but I wonder how can all the posts be modified to add a whitespace?

(Jay Pfaffman) #7

I don’t know off-hand. I’d try like

rails c

but I’m 99% sure that the same limits will be enforced.

What I’d probably do is just have the importer duplicate the title (or some generic text) in the post if the post is empty. No plugin required.

I think that you could do something like <div>&nbsp;</div>. I’ve seen posts where people complained that users were cheating the post requirements in similar ways.

(Bhanu Sharma) #8

So can an importer be programmed to loop in just a whitespace where the post data is blank? I hope it can be!

Ps: limits do apply that’s why I looped you in.

(Jay Pfaffman) #9

Not sure. A trick like I suggested would probably bypass the minimum post limit while still appearing to be blank.

(JC Ford) #10

The ‘appearing to be blank’ bit is less important than the user not having to go to the body and type something. It’s an unnecessary extra step when they’ve said all they meant to say in the title.

And I know it’s a fairly minor inconvenience. I’m just trying to grease the new forum adoption wheels.

(Kane York) #11

Oh, did you notice the feature where if you paste a link in for the topic title, it gets replaced by the title of the link & the body gets filled in with the link itself?

That’ll probably reduce some of your “I want to post fast” friction.

(James) #12

Any way we can actually set the min_post_length to 0 characters required (title still required)? I would genuinely appreciate this so much.

(Jeff Atwood) #13

Not going to happen on my watch, sorry!

This directly contravenes what Discourse stands for – substantive conversations.

(James) #14

I understand, there’s nothing wrong with that, but why not make it an option for uncommon communities? Sometimes the title can effectively communicate a casual question, ex. Quora.

(Jeff Atwood) #15

Why not use different free open source software if the desired use case is so different?

(James) #16

Because I use and support the discourse platform. We can just have a discussion over this, or civilized discourse.

(Sam Saffron) #17

You are going to need a plugin to make this happen, I do not see this setting ever being added to Discourse core.

(JC Ford) #18

I’d argue the use case is not different.

Have you really never written a post in which the subject line said all you needed to say?

(Jeff Atwood) #19

Not in my life that I can recall to date, no. Maybe before I’m dead?

(JC Ford) #20

You clearly frequent a different type of community than I. :wink:

It’s not a big deal. My users are pretty much used to it already.