Increase character limit for markdown fields.
Context: https://github.com/LemmyNet/lemmy/issues/2546
50k characters seems a reasonable increase from the current 10k.
Not sure if this is a regression, but I seem to be hitting an invisible char limit in post body fields.
In the absence of a wiki feature, I'm trying to create a large post (user guide) with approximately 22K characters. Upon submission, the Create button simply spins indefinitely. Can submit much shorter posts without issue. I see that others are having a similar issue with a 7K+ char post.
The backend has a max length of 10k characters.
https://github.com/LemmyNet/lemmy/blob/main/crates/utils/src/utils/validation.rs#L20
Would it make sense to reopen LemmyNet/lemmy#2546 instead of this issue here?
It took me a while to figure out why I couldn't submit the post. A warning for when we hit the character limit would be nice, at least.
The backend has a max length of 10k characters.
https://github.com/LemmyNet/lemmy/blob/main/crates/utils/src/utils/validation.rs#L20
i'm not sure if that's what's happening here, since that validation was only added recently (https://github.com/LemmyNet/lemmy/commit/38d4429ae7cef27089263cc39dc0fa9647263d6d) and only appears to be in v0.18.0.
but i've also definitely run into this issue with 0.17.4.
I confirm that I am also hitting this error. The server is running 0.17.4 and the post I am trying to submit has about 21k characters.
From the browser I see the websocket request to POST data, but no answer at all. From Jerboa I get an "invalid_body_field" error, which made me thing about the size of the text, and matches https://github.com/LemmyNet/lemmy/blame/37754189524e761626917295958cc156b1d21481/crates/utils/src/utils/validation.rs#L75
Sincerely hoping we see this bumped to at least 50K chars soon. It's holding back more than a few former subreddits from getting their wikis running on lemmy.
@dessalines Is this a backend-related task?
Changing this line works in my tests to increase the limit to 50k chars. However the same limit also applies to comments, which seems too much. So there should be a separate, lower limit added for comments imo.
For anyone arriving here wondering why they can only post 10k characters - well I don't have an answer for you, but know that if you post it first, then you can edit it and it allows the 50k in the edit.
if you post it first, then you can edit it and it allows the 50k in the edit.
This doesn't work for me on Lemmy 0.19.2. Editing a comment field (in the web UI) to add more text also triggers the cryptic invalid_body_field error. I assume the error comes from the back end.
This doesn't work for me on Lemmy 0.19.2. Editing a comment field (in the web UI) to add more text also triggers the cryptic
invalid_body_fielderror. I assume the error comes from the back end.
Not surprising, because of significant backend changes, but good to know.
I checked the logic on the back end, and it looks okay: https://github.com/LemmyNet/lemmy/blob/1be7dbde3379ea9ac4da49c6cc287f563ce08572/crates/utils/src/utils/validation.rs#L160
Lemmy-ui might also need to be updated for this limit tho.