phpBB Digests

Buglog -2.2.17 and no Ending mail_digests.php message - phpBB Digests

Buglog -2.2.17 and no Ending mail_digests.php message

New postby luv » Mon Aug 29, 2011 3:54 pm

I'm having some problems with the digest so I went to the site ask questions and in the bug log I saw this for
Hide
This is a minor problem that happens with version 2.2.17 only. If there are no digests going out for an hour, a Starting mail_digests.php will appear but an Ending mail_digests.php message will not. Apparently it's not a good idea to try to save the message queue if there is nothing in it, and that keeps the program from closing normally.

To fix around line 651 of mail_digests.php find:

Code: Select all
$messenger->queue->save(); // Writes the queue to disk. Seems to be necessary
$messenger->queue->process(true); // Send everything in the queue, even if it is over the limit.

and replace with:
Code: Select all
if (sizeof($rowset) > 0)
{
   $messenger->queue->save(); // Writes the queue to disk. Seems to be necessary
   $messenger->queue->process(true); // Send everything in the queue, even if it is over the limit.
}



I went to do this and found the code to find had already been commented out. Do I then add the second code?

-Christi
eTA I am indeed running 2.2.17
luv
Registered User
 
Posts: 37
Joined: Sat Jun 17, 2006 4:12 pm

Re: Buglog -2.2.17 and no Ending mail_digests.php message

New postby MarkDHamill » Mon Aug 29, 2011 4:05 pm

If the code was commented out then there is no guarantee that all your digests went out for an hour, but may be stuck in the mail queue to be delivered at a future time. If that concerns you, overwrite the code with my solution.
Get the latest versions of my Digests and Smartfeed mods.
MarkDHamill
Registered User
 
Posts: 2117
Joined: Fri Aug 02, 2002 12:36 am
Location: Oak Hill, Virginia USA

Re: Buglog -2.2.17 and no Ending mail_digests.php message

New postby luv » Mon Aug 29, 2011 4:09 pm

Thank you I will.
luv
Registered User
 
Posts: 37
Joined: Sat Jun 17, 2006 4:12 pm

Re: Buglog -2.2.17 and no Ending mail_digests.php message

New postby luv » Mon Aug 29, 2011 4:12 pm

Now I get this when I run manually
Code: Select all
Starting mail_digests.php
A digest was sent to admin (emailremoved) containing 13 posts and 0 private messages

Fatal error: Call to a member function save() on a non-object in /home/phpBB3/mail_digests.php on line 656

Line 656 is
Code: Select all
   $messenger->queue->save(); // Writes the queue to disk. Seems to be necessary
luv
Registered User
 
Posts: 37
Joined: Sat Jun 17, 2006 4:12 pm

Re: Buglog -2.2.17 and no Ending mail_digests.php message

New postby MarkDHamill » Mon Aug 29, 2011 4:16 pm

Did you make all the changes to /includes/functions_messenger.php called for in version 2.2.17?
Get the latest versions of my Digests and Smartfeed mods.
MarkDHamill
Registered User
 
Posts: 2117
Joined: Fri Aug 02, 2002 12:36 am
Location: Oak Hill, Virginia USA

Re: Buglog -2.2.17 and no Ending mail_digests.php message

New postby luv » Mon Aug 29, 2011 4:23 pm

I thought I did but I'll go back and double check.. I'll double check the whole install. THanks :)
luv
Registered User
 
Posts: 37
Joined: Sat Jun 17, 2006 4:12 pm

Re: Buglog -2.2.17 and no Ending mail_digests.php message

New postby luv » Mon Aug 29, 2011 5:53 pm

I went through he whole install file and yes those edits (along with all others ) were properly made.

When I run it manually and there is no digest to send I get:
Hide
Starting mail_digests.php
Ending mail_digests.php


When there is a digest to send I get:
Hide
Starting mail_digests.php
A digest was sent to admin (removed email) containing 14 posts and 0 private messages

Fatal error: Call to a member function save() on a non-object in /home/content/53/6848153/html/phpBB3/mail_digests.php on line 653
luv
Registered User
 
Posts: 37
Joined: Sat Jun 17, 2006 4:12 pm

Re: Buglog -2.2.17 and no Ending mail_digests.php message

New postby MarkDHamill » Mon Aug 29, 2011 6:26 pm

This is probably a write permissions problem. Is your cache folder publicly writeable? phpBB must be able to write queue.php in the /cache folder. Unix permissions should be 777 for the folder.

If you did not make the patch at the start of this topic, this error may be a symptom of this problem.

Purge your cache after any of the above.
Get the latest versions of my Digests and Smartfeed mods.
MarkDHamill
Registered User
 
Posts: 2117
Joined: Fri Aug 02, 2002 12:36 am
Location: Oak Hill, Virginia USA

Re: Buglog -2.2.17 and no Ending mail_digests.php message

New postby luv » Mon Aug 29, 2011 6:34 pm

cache folder is 777
I don't see 'queue.php' but i do see 'queue.php.lock' in the cache folder.
luv
Registered User
 
Posts: 37
Joined: Sat Jun 17, 2006 4:12 pm

Re: Buglog -2.2.17 and no Ending mail_digests.php message

New postby luv » Mon Aug 29, 2011 6:34 pm

purged cache - same error
luv
Registered User
 
Posts: 37
Joined: Sat Jun 17, 2006 4:12 pm

Re: Buglog -2.2.17 and no Ending mail_digests.php message

New postby luv » Mon Aug 29, 2011 6:39 pm

Opened queue.php.lock in an editor and it's an empty file.
Added a queue.php
set both queue.php.lock and queue.php to 777 (in addition to the cache folder)
luv
Registered User
 
Posts: 37
Joined: Sat Jun 17, 2006 4:12 pm

Re: Buglog -2.2.17 and no Ending mail_digests.php message

New postby MarkDHamill » Mon Aug 29, 2011 6:43 pm

Did you make the change to mail_digests.php at the start of the topic? Writing a mail queue when there is nothing to put in it will cause this error.
Get the latest versions of my Digests and Smartfeed mods.
MarkDHamill
Registered User
 
Posts: 2117
Joined: Fri Aug 02, 2002 12:36 am
Location: Oak Hill, Virginia USA

Re: Buglog -2.2.17 and no Ending mail_digests.php message

New postby luv » Mon Aug 29, 2011 6:47 pm

Yes I did.

I get the error when then this is in place
Code: Select all
if (sizeof($rowset) > 0)
{
   $messenger->queue->save(); // Writes the queue to disk. Seems to be necessary
   $messenger->queue->process(true); // Send everything in the queue, even if it is over the limit.
}


But not when it is commented out.
luv
Registered User
 
Posts: 37
Joined: Sat Jun 17, 2006 4:12 pm

Re: Buglog -2.2.17 and no Ending mail_digests.php message

New postby MarkDHamill » Mon Aug 29, 2011 7:00 pm

I assume it fails on the save line. If $messenger is not defined as an object, it would fail. Line 27 needs to be:

Code: Select all
include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); // Used to send emails


and line 149 needs to be:

Code: Select all
$messenger = new messenger();


Otherwise I am at a loss. Your permissions look correct. Unless you missed a modification to functions_messenger.php or some other mod made changes to it, you should be fine.
Get the latest versions of my Digests and Smartfeed mods.
MarkDHamill
Registered User
 
Posts: 2117
Joined: Fri Aug 02, 2002 12:36 am
Location: Oak Hill, Virginia USA

Re: Buglog -2.2.17 and no Ending mail_digests.php message

New postby luv » Mon Aug 29, 2011 7:05 pm

Both line 27 and 149 are correct according to above.

I've checked my edits to functions_messenger.php as dictated by the digest install file twice now.

I have KISS portal and Calendar mods installed. I'll go pull their install files again to see if they modified functions_messenger.php.

Thanks for your help :)
luv
Registered User
 
Posts: 37
Joined: Sat Jun 17, 2006 4:12 pm

Next