Page 1 of 1

Hebrew Search problem

Posted: Tue Sep 16, 2008 8:41 am
by magnetall
I have Joomla 1.5.7 installed.
When I perform hebrew search on site i get following warnings :

Code: Select all

Warning: preg_replace() [function.preg-replace]: Compilation failed: invalid UTF-8 string at offset 6 in E:\hosting\member\****\components\com_search\views\search\view.html.php on line 145

Warning: sprintf() [function.sprintf]: Too few arguments in E:\hosting\member\*****\libraries\joomla\methods.php on line 138

after the warnings search results are apear.
If i perform english search , sprintf() warning apear

Re: Hebrew Search problem

Posted: Wed Sep 17, 2008 6:20 am
by magnetall
As workaround I disabled following line at components\com_search\views\search\view.html.php

Code: Select all

$row = preg_replace($searchRegex, '<span class="highlight">\0</span>', $row );
But I looking for real solution. Somebody have an idea?

sprintf() warning was because of wrong format in language file.

Re: Hebrew Search problem

Posted: Mon Nov 03, 2008 10:55 am
by 3dentech
the error is because of line

Code: Select all

		$this->result	= JText::sprintf( 'TOTALRESULTSFOUND', $total );
probably your translation use more or less then 1 arguments %s
make shure that there are only one %s on the translation

Re: Hebrew Search problem

Posted: Mon Jun 08, 2009 2:07 pm
by boozi
to solve this remove the second "%s" parameter in the line :

TOTALRESULTSFOUND=נמצאו סה"כ %s תוצאות. חיפוש הביטוי <b>%s</b> בעזרת

in the file languages\he-IL.com_search.ini

like 3dentech mentioned, there is only one parameter expected.

Hope this helps anyone running into the same issue,

Boaz

Re: Hebrew Search problem

Posted: Wed Jun 17, 2009 11:47 pm
by 3dentech
This also happens on pt-BR, is just a simple tranlation error

Re: Hebrew Search problem

Posted: Mon Jul 27, 2009 5:25 pm
by winndd5
I got the same problem:

Warning: sprintf() [function.sprintf]: Too few arguments in /home/*****/public_html/rtupgrade/libraries/joomla/methods.php on line 138

Went ahead and check all that's been posted here. All seems to be correct. The problem persist. Any other suggestion?

Re: Hebrew Search problem

Posted: Wed Mar 17, 2010 4:00 pm
by SoftDux
Hi,

Have you found a problem to the solution yet? I'm getting the same error, on a Joomla 1.5.15 website

Re: Hebrew Search problem

Posted: Mon Jul 12, 2010 12:29 pm
by talchu
Thanks, Boozi solution (changing the translation string) worked.

Re: Hebrew Search problem

Posted: Mon Aug 02, 2010 9:21 am
by talchu
Supplemental: the problem of "too few arguments" can happen in other cases too (e.g. when you have more than 1 page in the results), even after you change the TOTALRESULTSFOUND, as Boozi wrote).

I found out that the pagination function looks for text translation JPAGE_CURRENT_OF_TOTAL, so changing it in /langages/he-IL/he-IL.ini to JPAGE_CURRENT_OF_TOTAL=עמוד %s מתוך %s solved the pagination missing parameters warning message.

Re: Hebrew Search problem

Posted: Thu Apr 24, 2014 10:42 am
by victoriayz
Hello,www.leaksfix.com http://www.workouttoday.net
http://www.restoreacar.net
I was looking for this and I've found this thread !
http://www.gardenhosepro.com
Thanks talchu. I've changed JPAGE_CURRENT_OF_TOTAL and it worked.http://www.bugskiller.net http://snorerx.wordpress.com
tycoongoldaddon.org
Victoriawww.ipillows.net
www.abetterhearing.net

Re: Hebrew Search problem

Posted: Thu Aug 06, 2015 2:18 pm
by seinfeld001
Both methods described work for me.