I hope this is the right forum

I’m using Piwik (0.4.3) on Drupal (6013).
The Drupl module (6.x-1.1) was installed and configured. When I try to get reports, with Firefox (3.0.1) I have the following error:

Open Flash Chart

JSON Parse Error [Syntax Error]
Error at character 0, line 1:
0:

Someone can help me?

Thanks

Comments

qwertmax’s picture

try this

diff --git a/includes/common.inc b/includes/common.inc
index b86f2d2..ff246a3 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -2539,8 +2539,8 @@ function drupal_to_js($var) {
     case 'resource':
     case 'string':
       return '"'. str_replace(array("\r", "\n", "<", ">", "&"),
-                              array('\r', '\n', '\x3c', '\x3e', '\x26'),
-                              addslashes($var)) .'"';
+                              array('\r', '\n', '\u003c', '\u003e', '\u0026'),
+                              str_replace("\'","'", addslashes($var))) .'"';
     case 'array':
       // Arrays in JSON can't be associative. If the array is empty or if it
       // has sequential whole number keys starting with 0, it's not associative