Closed (won't fix)
Project:
MailQ (Mail Queue)
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Mar 2008 at 13:40 UTC
Updated:
28 Feb 2010 at 16:23 UTC
Drupal allows an administrator to 'run cron manually' from the Status report page (admin/logs/status). If you have mail in the active queue when you 'run cron manually', this mail will not be sent. Instead, this mail is re-queued so that there are then 2 copies of each mail item in the active queue.
Comments
Comment #1
Michael Phipps commentedI develop on a local machine first, and so ran into the same problem. I've looked into this a little bit, and the way that the module tests to see if it is being run by cron is flawed. It tests to see if a particular filename is in the path.
I've been working on a fix for this, but I have no idea how to submit patches.
Basically, to fix the problem, I've set a variable called $is_cron_running in the mailq_cron(). Then I've modified the druapl_mail_wrapper so that it checks the value of that variable to see if cron is running before modifying the mail task to a queing task.
My local setup does not have a functioning mail server, so I need to test this on another machine before I feel confident it is working correctly.
If I can work out how to patch things - I'll submit something.
Comment #2
Michael Phipps commentedActually - I think my way of approaching things is a little flawed, and I've realised the if statement containing the test to see if cron was running wasn't the best it could be. Rather than using another variable to track this, try this codesnippet:
if ($_GET['q'] == 'admin/logs/status/run-cron' || $_SERVER['REQUEST_URI'] == '/cron.php')Comment #3
zyxware commented@InternetPro - Thanks for the suggestion. This fix has been made in the 6.x version of the module. I am marking this 5.x issue as wont-fix.
Comment #4
zyxware commentedMarking this 5.x issue as wont-fix.