json_encode(): Invalid UTF-8 sequence in argument... Warning after update to (Piwik 1.8.2)

Hi guys!

I just updated to (Piwik 1.8.2) - now i get this warning. Is it bad? Or how can I fix it?

PHP Version 5.3.3-7+squeeze8

json support enabled
json version 1.2.1

MySql 5.1.61


Warning: json_encode(): Invalid UTF-8 sequence in argument in /srv/www/webXXX/html/piwik/core/Common.php on line 1129

Backtrace -->
#0 Piwik_ErrorHandler(...) called at [:]#1 json_encode(...) called at [/srv/www/webXXX/html/piwik/core/Common.php:1129]#2 
Piwik_Common::json_encode(...) called at [/srv/www/webXXX/html/piwik/plugins/Dashboard/Controller.php:24]#3 
Piwik_Dashboard_Controller->getDashboardView(...) called at [/srv/www/webXXX/html/piwik/plugins/Dashboard/Controller.php:34]#4 
Piwik_Dashboard_Controller->embeddedIndex(...) called at [:]#5 call_user_func_array(...) called at [/srv/www/webXXX/html/piwik/core/FrontController.php:138]#6 Piwik_FrontController->dispatch(...) called at [/srv/www/webXXX/html/piwik/index.php:53]



Thanks!

Thanks for the report! what language were you using to generate this error?

does it work OK in english language piwik?

I set piwik into german translation.

I tried many different languages - but the same warning…

Where exaclty do you see this error? how can we reproduce it do you know? it is important that we can reproducec to fix the bug. thanks!

Ahoi Matt,

I see this error on my dashboard… and neraly on other pages but not on

'visitor , goals, actions… ’

so it seems to be that piwik is counting the visitora very well , but that it can’t display all…

This error is complicated to refus…

So I hope you can all restore your friendship to get the project forward… :slight_smile:

-kons

Thanks. can you please apply following patch:


Index: core/Common.php
===================================================================
--- core/Common.php	(revision 6463)
+++ core/Common.php	(working copy)
@@ -1125,7 +1126,7 @@
 		{
 			return _json_encode($value);
 		}
-
+var_dump($value);
 		return json_encode($value);
 	}

and then generate the page-> It should display more things. Please PM me the full output message.
Thanks!!

THEN to fix the issue for you simply replace
return json_encode($value);

by return @json_encode($value);

at this line 1129

(but pls Id appreciate the full output to help fix the root bug)