Advertisement:

Author Topic: How to remove 65K character limit on messages  (Read 1353 times)

Offline DeveloperMcD

  • Semi-Newbie
  • *
  • Posts: 12
How to remove 65K character limit on messages
« on: March 20, 2019, 10:30:44 PM »
I notice that messages (posts) are limited to a 16-bit value, or 65,535 characters.

However, I noticed that the database has the post "body" set to LARGETEXT which should be able to store 2.4 GB or something like that.

How can I remove this artificial limitation on post size?

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,699
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: How to remove 65K character limit on messages
« Reply #1 on: March 20, 2019, 10:56:19 PM »
Change the body to medium text, also you'll need to change the limit on the function for createpost.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,241
Re: How to remove 65K character limit on messages
« Reply #2 on: March 20, 2019, 11:05:02 PM »
Don't have a 1.1 install, but in 2.0 you can try Admin -> Posts and Topics -> Post Settings.  Set 'Maximum allowed post size' to 0 for no limit.

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,699
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: How to remove 65K character limit on messages
« Reply #3 on: March 21, 2019, 12:53:34 AM »
That doesn't work, unfortunately. It needs to be done manually

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,539
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: How to remove 65K character limit on messages
« Reply #4 on: March 21, 2019, 01:22:09 AM »
Change the body to medium text
This is definitely good advice.

also you'll need to change the limit on the function for createpost.
This I don't think is needed.

It needs to be done manually
And, I do believe not.

Just set the post limit size in the admin panel to something larger than 65K, but NOT 0.

Do take note that any limit you decide to set here, you will also have to make sure many other settings can cope with. Such as PHP limits and mysql limits.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.
  Fooling around with an i7 990X @ 3,47Ghz / 12Gb / Win 10 x64 / 3840x2160


How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,384
    • StoryBB/StoryBB on GitHub
Re: How to remove 65K character limit on messages
« Reply #5 on: March 21, 2019, 03:36:34 AM »
Wait.

This isn’t that simple, changing it can break things.

If you are on 2.0, just change the size of allowed post characters to something bigger than 65536 and it’ll convert, provided that you aren’t using full text search, because full text indexes with mediumtext aren’t supported.

Don’t bother with largetext, that just eats space and you can’t post a post big enough to fill even a mediumtext without reconfiguring MySQL anyway.

If you are on 1.1, upgrade to 2.0.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,699
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: How to remove 65K character limit on messages
« Reply #6 on: March 21, 2019, 07:45:36 AM »
I take back what I said about manually changing the code on 2.x. On 1.x however I remember precisely that it only worked after the medium text switch and manually altering the code