@anonymous-piwik-user opened this Issue on January 21st 2014

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:


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)


if (pregmatch('/^[0-9a-zA-Z]*$/D', $jsonCallback) > 0) {



if (pregmatch('/^[0-9a-zA-Z.]*$/D', $jsonCallback) > 0) {

It would be great :)



Keywords: angularjs,callback,jsonp
@mattab commented on January 21st 2014 Member

In 96ac58866e19101c50e1198349699a2a2416cb60: Fixes #4560: Piwik API can be used with AngularJS JSONP callback
Thanks for the report & fix!

This Issue was closed on January 21st 2014
Powered by GitHub Issue Mirror