@arminrosu opened this Issue on June 7th 2012

I had an issue today, trying to send a report (my first time doing so). This was my URL (I've previously set it to display logs in from 09 May - 06 June):

../piwik/index.php?module=PDFReports&action=index&period=range&date=2012-05-09%2C2012-06-06&idSite=1&updated=3#

This then generated the following error:

API returned an error: The date '2012-05-09[b]%2C[/b]2012-06-06' is not a correct date range. It should have the following format: 'lastN', 'previousN', 'YYYY-MM-DD,YYYY-MM-DD'.```

Inspecting the network transmission, it confirmed, that the transmitted date range string (before url encoding) was: "2012-05-09%2C2012-06-06" ("%2C" is a url-encoded comma).

I tracked this down to /piwik/plugins/PDFReports/templates/pdf.js, line 93. Change this:

parameters.date = broadcast.getValueFromUrl('date');```

to this:

parameters.date = decodeURIComponent( broadcast.getValueFromUrl('date') );```

And the problem should be solved
@mattab commented on June 17th 2012 Owner

Thanks for the report!

@diosmosis commented on October 19th 2012 Member

Matt, is there a reason Piwik_Common::getRequestVar doesn't call urldecode?

@mattab commented on October 24th 2012 Owner

This was fixed in #3387

This Issue was closed on October 24th 2012
Powered by GitHub Issue Mirror