Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Max size of discussion

I found a max comment size in the config file, but not the max discussion body size. Is there a maximum? If so, how do I control it?

Tagged:

Best Answers

  • hgtonighthgtonight MVP
    Answer ✓

    'Vanilla.Comment.MaxLength' is used for the restriction on both discussion bodies and comment bodies.

    The reason is two-fold: Discussions used to not have any "Body" field and posting a new discussion was effectively creating the discussion and immediately posting a comment to it. It also makes sense to keep them the same limit.

    Note that the Body fields in the discussion and comment tables use the text type, which effectively limits your input to 65,535 bytes. Each "standard" character is a byte, so you can translate it directly into "length size".

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Answers

  • hgtonighthgtonight MVP
    Answer ✓

    'Vanilla.Comment.MaxLength' is used for the restriction on both discussion bodies and comment bodies.

    The reason is two-fold: Discussions used to not have any "Body" field and posting a new discussion was effectively creating the discussion and immediately posting a comment to it. It also makes sense to keep them the same limit.

    Note that the Body fields in the discussion and comment tables use the text type, which effectively limits your input to 65,535 bytes. Each "standard" character is a byte, so you can translate it directly into "length size".

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • rbrahmsonrbrahmson ✭✭✭

    Thanks for the insightful response and alerting me on the database limit.
    Believe it or not, I pasted an article as a new discussion test for users to comment on and I did hit the limit...

    I did notice the lack of a formal term for the discussion "body", though for my users I felt it clearer to use that term.

  • I posted a comment of size 4020 characters and it said Body is 3978 characters too long. Why?

  • edited April 2016

    @Irfanalam123 said:
    I posted a comment of size 4020 characters and it said Body is 3978 characters too long. Why?

    I changed the default 8000 value to 24000 from the Advance Setting from Administration Panel. Now I am able to post!

Sign In or Register to comment.