I tried to make char limit 150k, but I’m limited to 99k:
Our use for this is that we have in-game bad behavior reports posting chat logs from the game. Some games are longer than others. I have no problem eating the space if it starts to get big.
We have a spoiler for our logs. We click it and ctrl+f the info we want, all color-coded (the color coding takes up a lot of the +characters with
[color][/color] each line.
Anyway, the more choices we have the better – I’d love to know how to break this limit in the admin dashboard beyond 99k. Or if that’s not possible, something hacky would work too if there’s a file I can edit.
I suggest you get users to post enormous logs at a third party service like pastebin. Or clip the logs to just the relevant parts.
How come, though, if it seems like simply a number? 80% of most logs are under the amount specified, but 20% are not, causing issues. It’d be way easier to change 1 number than change our entire streamline of post delivery.
If we’re happy to take the storage hit, what difference does it make? I’m really enjoying our solution – it fits perfectly with our daily use this way. DigitalOcean now offers those hard drive extensions, making storage extremely affordable. Since Discourse is most advertised to use with DO, this would only make sense if people wouldn’t mind bumping up things like this.
Plus, the option to go up without it effecting anyone unless they want it to go up (much like any other option with file size limit) always seems like a positive change. Choices = better
Here’s the magic number.
Not sure why it’s exactly 99k, but you could write a simple plugin that overrides the max value.
There might also be a search hit (either slower search or poor results).
In our case, only staff can see it, so it wouldn’t effect anyone else. In that case, could simply offer a warning that higher than 100k may cause instability. However, the difference between 100k and 150k (our new max we’d like) I can’t imagine being an incredible amount of difference, esp on the high-end VPS.
As long as people are warned (just like most other areas that warn), shouldn’t it be up to the admin? The difference between 100k and 1 mil I can see, but in our example, we just want to raise it to 150k.
So is there a file I can edit to achieve this?
OH! My bad, I missed this post. Thanks~ can I just change this value directly at discourse/discourse/blob/master/config/site_settings.yml#L456-L459 ? Will it break if I update? I probably won’t have enough time to look into plugins until early next year, so just trying to hop on ezstreet for the time being while our reports are broken. There’s a lot of nasty people that we need to banhammer where the reports aren’t going through for long games.
I very strongly recommend not modifying the files directly. It will either break updates, or more likely revert to the default every time you update.
A plugin to override a site setting should be a single file, nearly as easy as modifying the file.
I think I’m just going to change the file and not update for a few versions. This is pretty much the opposite of “nearly as easy as modifying the file” O_O
If you choose to do that (and I still don’t recommend it) - please keep an eye on the Commit log for security related commits. They’ll start with
SECURITY: - you don’t want to skip installing those.
I just threw together a super quick and dirty plugin for you @dylanh724: https://github.com/jomaxro/discourse-plugin-site-setting-override. This will override the
max post length maximum value to be 150,000.
Install it like a normal plugin: Install Plugins in Discourse
Oh, wow! I didn’t expect that. Thank you so much!!
You’re quite welcome. It’s a good example plugin to have - I will do a write up in #plugin eventually.
I updated this setting, and a couple other occurences of
max_post_length in the code, and then restarted the container, but I am still getting the error message:
Body is limited to 32000 characters; you entered 148069.
Am I doing something wrong?
Do I need to restart docker or something? Nope, that didn’t work.
You should use the plugin instead of manually editing source files.
That’s what I did and it worked.
The only thing I would add is that there are two variables in the plugin: default and maximum char limit. But the one that Discourse seems to use is default, so it’s not clear why there are two variables.
Default is the value used in the setting by…default. As a site setting that value can be changed. In Discourse core the maximum value for the site setting is 99000. This plugin increases the maximum value selectable to 150000.
I had not seen that setting in the dashboard, maybe an earlier version didn’t display it or I missed it. Now I found it and the purpose of the 2 variables makes sense.
I’m considering dumping about 250,000 chars (the size of a lecture transcript) into about 47 posts at the minimum (the amount of lectures), and about 1000 posts at the maximum (if we consider transcripts in other languages). The goal is to make the transcripts searchable within the forum, as we have threads discussing the lectures.
Can discourse support that volume, or will it bring the forum to a standstill?
Use case is https://discuss.jordanbpeterson.community/t/get-jbps-lecture-transcripts-and-inject-them-into-their-appropriate-forum-topics/345?u=balupton