Daily E-mail report not sending e-mails

Thank you nucknuck.

To all other still experiencing this issue, please enable XDEBUG as specified in 301 Moved Permanently and look for fatal errors.

We need to find out if you are all experiencing the same issue or if there are different issues to deal with.

Thank you all for making Piwik better.

Same here with fresh install of Piwik and data import from access_log files

I want a cookie, a coffee and a solution :slight_smile:

[quote=nucknuck]
I want a cookie, a coffee and a solution :)[/quote]

Could you try the following patch in core/DataTable/Filter/Truncate.php ?


@@ -35,11 +35,13 @@
 	{
 		$table->filter('AddSummaryRow', array($this->truncateAfter));
 		$table->filter('ReplaceSummaryRowLabel');
+		$currentDataTableId = $table->getId();
 	
 		foreach($table->getRows() as $row)
 		{
 			try {
 				$idSubTable = $row->getIdSubDataTable();
+				if($currentDataTableId == $idSubTable) continue;
 				$subTable = Piwik_DataTable_Manager::getInstance()->getTable($idSubTable);
 				$subTable->filter('Truncate', array($this->truncateAfter));
 			} catch(Exception $e) {

If it doesn’t solve the issue, it means the cycle is more complex, ie. involving more than 2 DataTables or that DataTable ids are somehow invalid.

Added both lines and tried to get manually the report by mail.
Mail was sent.

Anything else to test or should I wait until this night if everything will go its right way?

[quote=nucknuck]
Added both lines and tried to get manually the report by mail.
Mail was sent.

Anything else to test or should I wait until this night if everything will go its right way?[/quote]

The purpose of that patch was to precisely pin down the issue. We now know what was breaking your reports. We will need to discuss with the team how we should correctly fix it.

You can keep the patch, it shouldn’t do any damage to your data. I would actually use it on my own data.

However, it has not been thoroughly tested so we can not provide any guarantee.

Ok, because of normally using piwik at business servers with about 100 sites and more - how long do you think you and your team it will take?

patch added in core/DataTable/Filter/Truncate.php
manually PDF still works
manually send email still works.
Now waiting for tomorrow…

wims

Morning has broken … Piwik did his job this night. Seems to be a working workaround.
Waiting for a permanent fix.

Thx!

[quote=wims]
patch added in core/DataTable/Filter/Truncate.php
manually PDF still works
manually send email still works.
Now waiting for tomorrow…

wims[/quote]

Now it’s tomorrow. Yes indeed, the report was sent!!!
Wonderful, all seems to work correct now, thanks a lot for the effort.
2 lines of codes added, that’s all

after a few weeks I’m less positive. Daily emails are sent only 2…3 times a week

wims

Please
can you supply the complete correct Trucate.php file ?

I’m not sure where the patch must go …does the last { is correct ?

[quote=Bretweb]
Please
can you supply the complete correct Trucate.php file ?

I’m not sure where the patch must go …does the last { is correct ?[/quote]

You need to add the two lines that are prefixed by the + sign.

Are you using Piwik 1.8.2 ?

Then the first line goes after line 37 (http://dev.piwik.org/trac/browser/tags/1.8.2/core/DataTable/Filter/Truncate.php#L37).

The second line goes after line 42 (http://dev.piwik.org/trac/browser/tags/1.8.2/core/DataTable/Filter/Truncate.php#L42).

Hi,

Add this two lines change nothing for me, the manually function works but this morning no mail…

Problem on my host ?

[quote=rouliendelavegas]
Hi,

Add this two lines change nothing for me, the manually function works but this morning no mail…

Problem on my host ?[/quote]

Would you be able to activate XDEBUG as suggested here 301 Moved Permanently and look for any fatal errors ?

Hello,

No report for me today and no log for xdebug, hope I installed well xdebug… For now I am going to modify Truncate.php file.

[quote=ludopaquet]
Hello,

No report for me today and no log for xdebug, hope I installed well xdebug… For now I am going to modify Truncate.php file.[/quote]

Could you follow what’s explained in Xdebug: Support; Tailored Installation Instructions to be 100% sure XDEBUG is activated ?

You need to create a PHP file with the phpinfo() instruction and copy paste the result on the form provided in the link above.

Done, I fixed a warning about xdebig php extension

My server is running from Centos 5.5 - apparently, the platform is not the issue. Same thing, here. I am using HTML format and the thing works fine if run manually. I have another site using the previous version of Piwik and those reports arrive.

To everyone with the issue:
It is very important that we understand the root cause of this bug. The patch by Julien works and fixes the problem, however there is a deeper data issue.

@all users: is there anyone who has a very small Piwik DB that you could send us by PM, that has the issue?

If you can send us a DB that we can reproduce the bug, we will be able tofind the root cause.
Thanks!

[quote=nucknuck]
Ok, because of normally using piwik at business servers with about 100 sites and more - how long do you think you and your team it will take?[/quote]

Hi nucknuck, we need your help to fix this as soon as possible.

Could you apply the patch below to truncate.php ?

It’s essentialy the same as the previous one except that we need to log the invalid DataTable to see what’s wrong with it.


{
 		$table->filter('AddSummaryRow', array($this->truncateAfter));
 		$table->filter('ReplaceSummaryRowLabel');
+		$currentDataTableId = $table->getId();
 	
 		foreach($table->getRows() as $row)
 		{
 			try {
 				$idSubTable = $row->getIdSubDataTable();
+				if($currentDataTableId == $idSubTable) { Piwik::log('PLEASE COMMUNICATE THIS LINE : ' . print_r($table, true) . ' | ' . print_r($row, true)); continue;}
 				$subTable = Piwik_DataTable_Manager::getInstance()->getTable($idSubTable);
 				$subTable->filter('Truncate', array($this->truncateAfter));
 			} catch(Exception $e) {

Please also configure piwik file logging, if not already done, in config/config.ini.php by setting :


[log]
logger_message[] = file

The log lines to communicate back to us will appear in tmp/logs/logger_message.htm

If it contains sensitive data, please send it via a private message.

Thank you for your help.

As Matt mentioned in 301 Moved Permanently, the fastest road would be to communicate to us the database or a subset of the database. However, we do understand that data privacy is crucial so the patch proposed above is an alternate solution.