Hello everyone,
Piwik API is not compatible with $http.jsonp in AngularJS.
Docs: http://docs.angularjs.org/api/ng.$http
An API call like :
`````` jsoncallback=JSON_CALLBACK```
will be transform by AngularJS as something like:
jsoncallback=angular.callbacks._0
But the Piwik API doesn't allow '.' in the jsoncallback parameter.
To fix this bug, you just have to change:
/core/DataTable/Renderer/Json.php``` (line 111)
```
#!php
if (preg_match('/^[0-9a-zA-Z_]*$/D', $jsonCallback) > 0) {
```
By:
```
#!php
if (preg_match('/^[0-9a-zA-Z_.]*$/D', $jsonCallback) > 0) {
```
It would be great :)
Thanks
Romain
Keywords: angularjs,callback,jsonp
Hello everyone,
Piwik API is not compatible with $http.jsonp in AngularJS.
Docs: http://docs.angularjs.org/api/ng.$http
An API call like :
`````` jsoncallback=JSON_CALLBACK```
will be transform by AngularJS as something like:
jsoncallback=angular.callbacks._0But the Piwik API doesn't allow '.' in the jsoncallback parameter.
To fix this bug, you just have to change: