"Search string must be less than %1$d characters long."
Can be replicated here, just search for something over the limit.
so this is only an SMF 2.0 bug?
I can't replicate it in my forum, not in 2.0.15 nor in 2.1
Screenshot:
https://prnt.sc/keebes
I can reproduce it here but I have to actually modify the form to get the content long enough to actually trip it... not sure where the sweet spot is, but I threw the alphabet several times at it.
Haven't tried on a local install yet. May also be dependent on search method...
I can't do it through the advanced form, just the quick search. No maxlength there.
Heh, I edited out the maxlength on the advanced form and reproduced it. I wonder if you need more than 100 to trigger it?
In any case... it *should* work even in 2.0...
elseif ($smcFunc['strlen']($search_params['search']) > $context['search_string_limit'])
{
$context['search_errors']['string_too_long'] = true;
$txt['error_string_too_long'] = sprintf($txt['error_string_too_long'], $context['search_string_limit']);
}
This should be updating $txt to have the limit put into it... not sure why it isn't.
Found it. The language file gets reloaded on line 63. I removed it to confirm.
this has been fixed in 2.1 a lifetime ago https://github.com/SimpleMachines/SMF2.1/commit/52490d900eeb7cbc3c3df980ecf595575735c0bd
live627 - so should we close this one out then?
Sure. I left thus open because I wasn't sure whether we should fix this in 2.0 or not, but it can only be reproduced by going out of our way by hacking.
Quote from: live627 on February 24, 2020, 01:28:40 AM
Sure. I left thus open because I wasn't sure whether we should fix this in 2.0 or not, but it can only be reproduced by going out of our way by hacking.
It's still a bug while using quicksearch, without any hacking.