Closed rafaucau closed 3 months ago
Is this still an issue?
EDIT: When I put a lot of words, the generated RegExp got truncated in the DB and so didn't work, but didn't cause an error.
@datitisev Is this still an issue?
I checked how it looks in the database. And it looks weird.
I'm assuming that array/regex is getting truncated because it's too big. Solution is probs to build it after a post but then that's wasting a lot of time creating a regex on every post save... 🤔 not sure what the best solution is.
@datitisev I'm assuming that array/regex is getting truncated because it's too big.
If you would like to test, here is the list of words I use: polish_bad_words.txt
Solution is probs to build it after a post but then that's wasting a lot of time creating a regex on every post save... 🤔 not sure what the best solution is.
Maybe a separate table where each word would be on a separate row? In one column the word, in the second column the generated regular expressions.
Or a separate table where a column would be longetxt.
Maybe a separate table where each word would be on a separate row? In one column the word, in the second column the generated regular expressions.
I don't think this would solve much... this would be a large query on every post save, probably taking up more time than simply generating the regex on post save from the word list 🤔.
Large query as you'd be retrieving hundreds of rows at once, I assume not a good idea.
@rafaucau Should be resolved with https://github.com/FriendsOfFlarum/filter/pull/53.
Bug Report
Current Behavior If I add a very large number of words to filter, writing posts does not work at all.
Steps to Reproduce
Screenshots
Environment