Plugin Author
Chouby
(@chouby)
Lost probably, one of your other plugins or your theme is sending bad data to WordPress translation function. Polylang intercepts this data and want ot use it, but since it is not of the correct type, PHP fires this warning.
Try de-activating your plugins or change your theme to find out which one is conflicting.
Hello Chouby, Thank you for the tip, and super quick response. I tried deactivating all my other plugins and I still got the same result. So my theme is the issue. grrr π I am now stuck. Is there anyway that it can be corrected. The theme should support polylang.
Plugin Author
Chouby
(@chouby)
Is your theme freely available?
No, it’s Bizz Theme car-hire theme. I have sent them a message and waiting for a response.
Plugin Author
Chouby
(@chouby)
Are you setting the language from content? Try setting it from the directory name in pretty permalinks. That may hide the message.
Hi Chouby,
I haven’t even got that far. I simply uploaded the file and got this message.
Plugin Author
Chouby
(@chouby)
I see. Does the message appear both on backend and frontend?
Can you help me debug this?
Edit polylang/include/olt-manager.php and just above the line 110, type:
if (!is_string($text)) {
echo $domain;
var_dump($text);
}
Then report here the extra messages it should display.
Once it is done, you delete the extra laines of code.
Yes the message appears on both ends. I am a bit worried about going into html files. I dont understand, Where would I edit those files, in the plug-in edit or on my theme files?
well if i try to look up on the plug-in edit polylang/include/olt-manager.php is not there.
Can you give me instuctions on in which file I need to edit this?
No documentation available for PLL_OLT_Manager()
That is the message i get if i go through dashboard.
plugins- I hit the edit button – there is a documentation and look up name search box. I searched for olt manager I see PLL_OLT_Manager() when I clicked to see it is not availalbe.
Plugin Author
Chouby
(@chouby)
You should not use the builtin editor. You don’t even have access to the line numbers. You should rather use an editor such as notepad++ and modify the file on your computer and upload it via ftp.
Is this line 110?
public function gettext($translation, $text, $domain) {
$this->labels[$text] = array(‘domain’ => $domain);
return $translation;
Plugin Author
Chouby
(@chouby)
Yes.
And for the test it should be:
public function gettext($translation, $text, $domain) {
if (!is_string($text)) {
echo $domain;
var_dump($text);
}
$this->labels[$text] = array('domain' => $domain);
return $translation;