Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trunk: Downloading PDF reports fails when date range activated #2290

Closed
julienmoumne opened this issue Apr 10, 2011 · 1 comment
Closed

trunk: Downloading PDF reports fails when date range activated #2290

julienmoumne opened this issue Apr 10, 2011 · 1 comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.

Comments

@julienmoumne
Copy link
Member

How to reproduce

  • Access piwik with a date range (demo.piwik.org)
  • Access Email reports
  • Download any report

Error is :

<result>
<error message="Date format must be: YYYY-MM-DD, or 'today' or 'yesterday' or any keyword supported by the strtotime function (see http://php.net/strtotime for more information)"/>
</result>

The API call to PDFReports.generateReport is set with

period=range&date=datex,datey

period is overridden with configured period report in
/plugins/PDFReports/API.php#L243

getProcessedReport is called with

period=month or week or day&date=datex,datey

/plugins/API/API.php#L360 is executed and throws an exception at /core/Date.php#L70 because the Date factory doesn't support date ranges.

Solutions

  • Override date with only one of the two provided dates
  • Allow date range scoped pdf reports when manually downloaded ?
  • Anything else ?
@mattab
Copy link
Member

mattab commented Apr 11, 2011

(In [4390]) Fixes #2290 PDF Reports will now be generated for period=range - thanks for the report Julien

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants