CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • Cron Mail_Report does not work, sends header+footer but no results
Pages: [1]

Author Topic: Cron Mail_Report does not work, sends header+footer but no results  (Read 1575 times)

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Cron Mail_Report does not work, sends header+footer but no results
October 30, 2012, 08:35:52 am
Hi,

If I run reports from the "Execute Now" dialogue in the scheduled jobs pages then I receive an email with a fully populated and correct report.

However when initiating it via a cron or wget it sends me a mail with the report header and footer but no content. To clarify no results are returned and the content is blank except for the HTML defined in the Report Header and Report Footer in the General Settings of the Report Settings. It is as if the report is not executing any SQL against my db.

The logs show this for the "Execute Now" option that works
Code: [Select]
Parameters raw (from db settings):
instanceId=38
format=print


Parameters parsed (and passed to API method):
a:3:{s:7:"version";i:3;s:10:"instanceId";s:2:"38";s:6:"format";s:5:"print";}

Full message:
Starting execution of Report sender

and this for the cron
php cli.php –j -u xxxxxx -p xxxxxxxx -e Job -a mail_report --instanceId=33 --format=print
Code: [Select]
Parameters raw (from db settings):
instanceId=38
format=print


Parameters raw (From Cli.php):
a:3:{s:7:"version";i:3;s:10:"instanceId";s:2:"38";s:6:"format";s:5:"print";}

Parameters parsed (and passed to API method):
a:3:{s:7:"version";i:3;s:10:"instanceId";s:2:"38";s:6:"format";s:5:"print";}

Full message:
Starting execution of Report sender

So - both methods pass the correct and identical parameters but for some reason the cron does not return the report with any content.

Any ideas?
« Last Edit: November 01, 2012, 07:59:29 am by speleo »

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Re: report from cron has header but no results
October 31, 2012, 02:03:23 pm
OK - another way of asking this is "has anybody got this to work?" 

A simple yes would tell me that it is something on my site.
Emailing reports via "Execute Now" works correctly.
Emailing reports via "Scheduled jobs" fails.  Mail is sent but only contains header / footer html.
Emailing reports via "Cron" fails.  Mail is sent but only contains header / footer html.


Can't reproduce on the sandbox as it does not send email (which you need to test this). 
Have looked at permissions, db settings, and a load of other ideas but still failing.
I'm running Joomla 2.55, CiviCRM 4.2, PHP 5.3.13, mySQL 5.0.96

An ice cold virtual pint to whoever can help :)

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Re: Cron Mail_Report does not work, sends header+footer but no results
November 01, 2012, 02:35:59 pm
There is lots of noise about crons not working properly all over the forum with mixed results but no magic fix.  Additionally there is quiet a lot of traffic on IRC about crons not working correctly.  If I was smarter I would work out how to fix this but I'm not.

At first I thought I might be alone on this at first but it is clear there are others out there too having problems.

Can't replicate on the sandbox as no access to crons and it doesn't send out emails.

Raised an issue http://issues.civicrm.org/jira/browse/CRM-11203

« Last Edit: November 02, 2012, 12:39:15 am by speleo »

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Re: Cron Mail_Report does not work, sends header+footer but no results
December 02, 2012, 01:34:21 pm
Finally got around to looking into this. 

Modifying  function check in /public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Permission/Joomla.php had no effect.

Managed to work around this by removing this line in /public_html/administrator/components/com_civicrm/civicrm/CRM/Report/Form/Member/Detail.php

Code: [Select]
function postProcess() {
    $this->beginPostProcess();
    // get the acl clauses built before we assemble the query
    // $this->buildACLClause($this->_aliases['civicrm_contact']);

Elegant - absolutely not.
Get's the result I need - yup. 

I wish I was smarter to work out an elegant way to resolve this but... I'm not.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • Cron Mail_Report does not work, sends header+footer but no results

This forum was archived on 2017-11-26.