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

PDFReports: misc/cron/archive.sh launches an exception #1661

Closed
anonymous-matomo-user opened this issue Aug 31, 2010 · 3 comments
Closed

PDFReports: misc/cron/archive.sh launches an exception #1661

anonymous-matomo-user opened this issue Aug 31, 2010 · 3 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@anonymous-matomo-user
Copy link

Find below the exception:

PHP Fatal error:  Call to undefined method Piwik_PDFReports::getReports() in /path/to/piwik-1.0/plugins/PDFReports/API.php on line 307
getReports()``` belongs to```
Piwik_PDFReports_API``` class and, now (far from v0.7, http://dev.piwik.org/trac/changeset?new=2989%40trunk%2Fplugins%2FPDFReports%2FPDFReports.php&old=2767%40trunk%2Fplugins%2FPDFReports%2FPDFReports.php#file0) PDFReports scheduled tasks send emails through a static call within the context of```
Piwik_PDFReports```:

class Piwik_PDFReports extends Piwik_Plugin
{
...
function generateAndSendScheduledReports($period)
{
...
// For each, generate the file and send the message with the attached report
foreach($reportsToGenerate as $report)
{
Piwik_PDFReports_API::sendEmailReport( $report['idreport'],
$report['idsite'],
$period);
}
}

@anonymous-matomo-user
Copy link
Author

Maybe:

--- piwik-1.0/plugins/PDFReports/PDFReports.php        2010-08-31 14:20:28.000000000 +0200
+++ piwik/plugins/PDFReports/PDFReports.php    2010-08-31 14:21:19.000000000 +0200
@@ -68,9 +68,9 @@
                // For each, generate the file and send the message with the attached report
                foreach($reportsToGenerate as $report)
                {
-                       Piwik_PDFReports_API::sendEmailReport(  $report['idreport'],
-                                                                                                       $report['idsite'],
-                                                                                                       $period);
+                       Piwik_PDFReports_API::getInstance()->sendEmailReport(   $report['idreport'],
+                                                                                                                                $report['idsite'],
+                                                                                                                                $period);
                }
        }

?

@robocoder
Copy link
Contributor

(In [3038]) fixes #1661 - $this not set correctly; thanks scara

@robocoder
Copy link
Contributor

(In [3042]) refs #1661 - propset svn:executable on archive.sh

@anonymous-matomo-user anonymous-matomo-user added this to the Piwik 1.1 milestone Jul 8, 2014
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. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

2 participants