The Joomla! Forum ™






Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Hebrew Search problem
PostPosted: Tue Sep 16, 2008 8:41 am 
Joomla! Intern
Joomla! Intern

Joined: Fri Jan 25, 2008 8:16 am
Posts: 58
I have Joomla 1.5.7 installed.
When I perform hebrew search on site i get following warnings :

Code:
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


Top
 Profile  
 
PostPosted: Wed Sep 17, 2008 6:20 am 
Joomla! Intern
Joomla! Intern

Joined: Fri Jan 25, 2008 8:16 am
Posts: 58
As workaround I disabled following line at components\com_search\views\search\view.html.php
Code:
$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.


Top
 Profile  
 
PostPosted: Mon Nov 03, 2008 10:55 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Fri Feb 01, 2008 11:39 pm
Posts: 120
Location: Brazil
the error is because of line
Code:
      $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

_________________
http://3den.org
3DEN - Open Software


Top
 Profile  
 
PostPosted: Mon Jun 08, 2009 2:07 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 07, 2007 2:38 pm
Posts: 30
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

_________________
http://www.hubeza.com


Top
 Profile  
 
PostPosted: Wed Jun 17, 2009 11:47 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Fri Feb 01, 2008 11:39 pm
Posts: 120
Location: Brazil
This also happens on pt-BR, is just a simple tranlation error

_________________
http://3den.org
3DEN - Open Software


Top
 Profile  
 
PostPosted: Mon Jul 27, 2009 5:25 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Jul 27, 2009 5:13 pm
Posts: 2
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?


Top
 Profile  
 
PostPosted: Wed Mar 17, 2010 4:00 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sun Oct 02, 2005 4:39 pm
Posts: 223
Location: Johannesburg, South Africa
Hi,

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

_________________
http://www.softdux.com
http://forum.softdux.com


Top
 Profile  
 
PostPosted: Mon Jul 12, 2010 12:29 pm 
User avatar
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Nov 25, 2009 11:02 am
Posts: 4
Location: Israel
Thanks, Boozi solution (changing the translation string) worked.

_________________
Please read forum rules regarding signatures: viewtopic.php?t=65


Top
 Profile  
 
PostPosted: Mon Aug 02, 2010 9:21 am 
User avatar
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Nov 25, 2009 11:02 am
Posts: 4
Location: Israel
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.

_________________
Please read forum rules regarding signatures: viewtopic.php?t=65


Top
 Profile  
 
PostPosted: Thu Apr 24, 2014 10:42 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Jan 12, 2014 4:41 pm
Posts: 4
Hello,

I was looking for this and I've found this thread !

Thanks talchu. I've changed JPAGE_CURRENT_OF_TOTAL and it worked.

Victoria


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 



Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group