OpenCart problem
Moderator: General Moderators
OpenCart problem
Hi,
I have no idea what happen to my friend's opencart website.
at the top of site showed this error code"
Warning: sprintf() [function.sprintf]: Too few arguments in /home3/yombee/public_html/steviahub.com/admin/controller/common/header.php on line 127
screenshot : https://www.dropbox.com/s/0rv5irlgar2vc ... 1.png?dl=0
i open header.php and see at line 127 :
$this->data['logged'] = sprintf($this->language->get('text_logged'), $this->user->getUserName());
anyone can help me what is the problem??
tq
I have no idea what happen to my friend's opencart website.
at the top of site showed this error code"
Warning: sprintf() [function.sprintf]: Too few arguments in /home3/yombee/public_html/steviahub.com/admin/controller/common/header.php on line 127
screenshot : https://www.dropbox.com/s/0rv5irlgar2vc ... 1.png?dl=0
i open header.php and see at line 127 :
$this->data['logged'] = sprintf($this->language->get('text_logged'), $this->user->getUserName());
anyone can help me what is the problem??
tq
Re: OpenCart problem
Did you make a change to the "text_logged" value somewhere? What is it now?
Re: OpenCart problem
no. i didnt make any change. i dont have any idea how to fix this.requinix wrote:Did you make a change to the "text_logged" value somewhere? What is it now?
search over the net also not have answer
Re: OpenCart problem
Weird, because I find all sorts of relevant things when I search around.
There's a configuration or language file thing somewhere. Inside it is the definition of the text_logged value. Find that and post it.
There's a configuration or language file thing somewhere. Inside it is the definition of the text_logged value. Find that and post it.
Re: OpenCart problem
i found this in my language pack at header.phprequinix wrote:Weird, because I find all sorts of relevant things when I search around.
There's a configuration or language file thing somewhere. Inside it is the definition of the text_logged value. Find that and post it.
<?php
// Text
$_['text_home'] = 'Laman Utama';
$_['text_wishlist'] = 'Senarai Hajat (%s)';
$_['text_cart'] = 'Troli';
$_['text_items'] = '%s barangan - %s';
$_['text_search'] = 'Carian';
$_['text_welcome'] = 'Selamat Datang, anda boleh <a href="%s">login</a> atau <a href="%s">pendaftaran baru</a>.';
$_['text_logged'] = 'Anda telah login sebagai <a href="%s">%s</a> <b>(</b> <a href="%s">Logout</a> <b>)</b>';
$_['text_account'] = 'Akaun Saya';
$_['text_checkout'] = 'Pembayaran';
$_['text_language'] = 'Bahasa';
$_['text_currency'] = 'Matawang';
?>
what is the problem sir?
Re: OpenCart problem
As a shot in the dark, try changing that value to
Code: Select all
$_['text_logged'] = 'Anda telah login sebagai <a href="%s">%%s</a> <b>(</b> <a href="%s">Logout</a> <b>)</b>';Re: OpenCart problem
requinix wrote:As a shot in the dark, try changing that value toCode: Select all
$_['text_logged'] = 'Anda telah login sebagai <a href="%s">%%s</a> <b>(</b> <a href="%s">Logout</a> <b>)</b>';
sir, i have changed but same result
Re: OpenCart problem
sir,
i try to follow the code in english language file as this :
$_['text_logged'] = 'Anda telah login sebagai <span>%s</span>';
the error disappeared but my web show this:
https://www.dropbox.com/s/ccb6965tm98ie ... 4.png?dl=0
the normal condition should show horizontal menu button name without the word "text_"
tq
i try to follow the code in english language file as this :
$_['text_logged'] = 'Anda telah login sebagai <span>%s</span>';
the error disappeared but my web show this:
https://www.dropbox.com/s/ccb6965tm98ie ... 4.png?dl=0
the normal condition should show horizontal menu button name without the word "text_"
tq
Re: OpenCart problem
Did you find that at admin/language/*/common/header.php? It can only use one %s placeholder in the string. For example, the English version hasskynet88 wrote:i found this in my language pack at header.php
Code: Select all
$_['text_logged'] = 'You are logged in as <span>%s</span>';Re: OpenCart problem
requinix wrote:Did you find that at admin/language/*/common/header.php? It can only use one %s placeholder in the string. For example, the English version hasskynet88 wrote:i found this in my language pack at header.phpCode: Select all
$_['text_logged'] = 'You are logged in as <span>%s</span>';
i found it in my language pack (malay language) but different with english language code.
$_['text_logged'] = 'Anda telah login sebagai <a href="%s">%s</a> <b>(</b> <a href="%s">Logout</a> <b>)</b>';
Re: OpenCart problem
Code: Select all
$_['text_logged'] = 'Anda telah login sebagai <span>%s</span>';Can you post the entire header.php file?
Re: OpenCart problem
header full code is i posted just now:
<?php
// Text
$_['text_home'] = 'Laman Utama';
$_['text_wishlist'] = 'Senarai Hajat (%s)';
$_['text_cart'] = 'Troli';
$_['text_items'] = '%s barangan - %s';
$_['text_search'] = 'Carian';
$_['text_welcome'] = 'Selamat Datang, anda boleh <a href="%s">login</a> atau <a href="%s">pendaftaran baru</a>.';
$_['text_logged'] = 'Anda telah login sebagai <a href="%s">%s</a> <b>(</b> <a href="%s">Logout</a> <b>)</b>';
$_['text_account'] = 'Akaun Saya';
$_['text_checkout'] = 'Pembayaran';
$_['text_language'] = 'Bahasa';
$_['text_currency'] = 'Matawang';
?>
<?php
// Text
$_['text_home'] = 'Laman Utama';
$_['text_wishlist'] = 'Senarai Hajat (%s)';
$_['text_cart'] = 'Troli';
$_['text_items'] = '%s barangan - %s';
$_['text_search'] = 'Carian';
$_['text_welcome'] = 'Selamat Datang, anda boleh <a href="%s">login</a> atau <a href="%s">pendaftaran baru</a>.';
$_['text_logged'] = 'Anda telah login sebagai <a href="%s">%s</a> <b>(</b> <a href="%s">Logout</a> <b>)</b>';
$_['text_account'] = 'Akaun Saya';
$_['text_checkout'] = 'Pembayaran';
$_['text_language'] = 'Bahasa';
$_['text_currency'] = 'Matawang';
?>
Re: OpenCart problem
That's all? The file should be a LOT larger. That English version I linked to had 79 lines of translations and yours only has 11.
Where did you get it from? It's not complete. You could copy the English one and translate the text yourself, but I'm worried there may be other problems with other files.
Where did you get it from? It's not complete. You could copy the English one and translate the text yourself, but I'm worried there may be other problems with other files.
Re: OpenCart problem
requinix wrote:That's all? The file should be a LOT larger. That English version I linked to had 79 lines of translations and yours only has 11.
Where did you get it from? It's not complete. You could copy the English one and translate the text yourself, but I'm worried there may be other problems with other files.
ya your right sir. english code is very long. i dont know what happen to malay language. so you suggest me to translate my self?
Re: OpenCart problem
You might have to: I looked for a few minutes and couldn't find any free extensions that include translations for the admin site.skynet88 wrote:so you suggest me to translate my self?