Increase the max post length setting above 150k

AI-generated summary

Increasing max post length above 150k

salbertelli is seeking to increase the max_post_length setting above 150,000 characters in Discourse v3.0.3. The current limit is causing issues with long technical responses that exceed the character limit.

Lilly suggested a plugin, but it only increases the limit to the default value of 150,000 characters. salbertelli noted that this is not sufficient, as they need to exceed this limit.

Lilly cautioned that exceeding the maximum post length may cause performance issues.

pfaffman provided a solution, recommending that salbertelli fork the plugin and modify the site_settings.yml file to override the setting.

salbertelli expressed gratitude for the insight and is planning to fork the plugin from the repository (https://github.com/jomaxro/discourse-plugin-site-setting-override) and make the necessary modifications.

pfaffman confirmed that the modification requires changing only 1-3 characters in the file.

Hello, we are using Discourse v3.0.3 and have the max_post_length is set to the default maximum value of 150,000 characters. However, several of our technical experts who provide solution responses from the field are encountering error messages that exceed the 150k limit.

If I try to increase the settings, I get the following error:

max_post_length: Value must be between 0 and 150000.

This issue has become problematic for us as the content relies heavily on interlinked parts with anchors. Splitting the content into multiple posts would require significant time and effort to rearrange everything accordingly. Moreover, it would negatively impact on the UX if readers have to navigate between multiple posts to access the complete information.

Is there a way to increase the value or disable it altogether?

TIA!

hi @salbertelli
i think you need to use this

Hi @Lilly,

Thank you for your response. It seems that the plugin you mentioned may have already been integrated into the core system. Unfortunately, the plugin only increases the max post length to the default value of 150,000, which is already the maximum limit for the version of Discourse we’re currently using.

However, my goal is to exceed the default limit of 150,000 characters.

ah yes i see that now in the yml file.

i’m suspect there is a way to go higher, but i think exceeding the maximum post length may potentially cause performance issues. i hope you can find a workable solution or someone else can give you some insight and help. :slightly_smiling_face:

Then

You’ll fork the plugin and change site_settings.yml as described.

Hi Jay,

That’s great news! Thanks so much for the insight. It seems that the next step is for me to fork the same plugin from the repository GitHub - jomaxro/discourse-plugin-site-setting-override · GitHub and make the necessary modifications in the site_settings.yml file.

Thanks again! I’m eager to give this a try. :slight_smile:

RIght! You’ll literally change only 1-3 characters in the file!