[Pushed] Wrong minimum reputation comment length
#1
When you change minimum reputation comment length in ACP from 10 MyBB still displays in "notification" that comment must be at least 10 characters. I checked what's wrong and it seems that in language files for reputation that value is just written there and not obtained through php scripts. Also when I add {1} (thought that someone maybe just forgot to change language files) and nope... still not working, just displayed {1} in text.
Reply
#2
I can confirm.
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#3
I think it is supposed to be like this because I have a forum running 1.6 and it has the same thing like you said in the language file also like that for 1.8.
Reply
#4
Yes and no. As you can see in ACP you can change minimum length of rep comment, but notification that it is indeed too short is still written to only 10 characters - people on my forum just reported this issue and It's obvious that there's something missing. Also quick and temporary fix is to change that value manually in language files Wink
Reply
#5
Can you push this to GitHub?
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#6
I guess it should be pushed, as long as something can be changed in ACP it should be used with that value, not with something typed in lang files.
Reply
#7
Good catch, confirmed ...

(2018-01-27, 10:31 PM)Shiraishi Wrote: ... Also when I add {1} (thought that someone maybe just forgot to change language files) and nope... still not working, just displayed {1} in text.

Just changing the language file will not fix the issue.
here is the full fix:

1. Open .\inc\languages\english\reputation.lang.php, go to line 22. Find:
$l['add_no_comment'] = "You must enter a comment of at least 10 characters to give this user a reputation rating.";
Change it to:
$l['add_no_comment'] = "You must enter a comment of at least {1} characters to give this user a reputation rating.";
Save file.

Do the same for all languages (if available more than one) suitably ...

2. Open .\reputation.php, go to line 274 and find:
$message = $lang->add_no_comment;
Change it to:
$message = $lang->sprintf($lang->add_no_comment, $mybb->settings['minreplength']);
Save file.

Issue resolved.
Reply
#8
Anyone gonna push this?
Reply
#9
We've already merged a PR to fix this, so there's not much point pushing it to GitHub.
Reply
#10
Cool, thanks ET Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)