Closed (fixed)
Project:
Simplenews
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jul 2007 at 12:36 UTC
Updated:
9 Dec 2008 at 10:22 UTC
Cron wasn't sending my newsletter, but after some checking I discovered that running cron after logging in does it.
I have seen a permission to "send newsletter", but I don't think giving anonymous user sending privileges is a good thing.
How can this be fixed?
Comments
Comment #1
sutharsan commentedPermission to "send newsletter" is required to send the newsletter when you edit/create the newsletter. No permissions are required to send a newsletter via cron.
Comment #2
enboig commentedthat's not what I see. My site was not sending newsletters, but if I login and then go to cron.php they were sent. I tried loging out and then newsletters stop being sent.
Comment #3
shrop commentedI have experienced the same issue. A user reported that the newsletter was in process to send for a couple of days. I logged in and checked to make sure that my hourly cron had been running in Drupal logs. They haad been. I then ran /cron.php while logged in and then emails started flowing.
Thanks,
Shrop
Comment #4
sponnet commentedI found a solution for this problem. We're using 'taxonomy access lite' and our problem was related to the fact that the 'Anonymous User' role didn't have access to the newsletter taxonomy terms.
After correcting this, the newsletters got sent from cron. Using curl instead of wget doesn't seem to change anything.
A structural problem may arise when users create new newsletters. They need to remember to add that term in the TAC-lite admin screen, or their problem will re-appear. You also need to give your newsletter administrative role access to the TAC-lite pages, which may not be what you want...
Possibly the same thing will happen when you use other modules like 'Taxonomy Access'
This problem looks to be related as a problem that was previously reported on Drupal 4.7 : http://drupal.org/node/134058
Stefaan Ponnet - Fusebox
Comment #5
chrissearle commentedHmm. I can confirm that the problem described in #4 is the same with full taxonomy access control.
Not so sure of the solution tho - since we don't want the nodes being sent to be accessible to the anonymous user :(
Open for suggestions - but - as a workaround I may have to code up a perl script that logs in first - grabs the login cookie then calls cron.php
Comment #6
sutharsan commentedNo response. Closing issue.
Comment #7
chrissearle commentedIt's still an issue - however the problem seems to be simplenews together with an access control (Taxonomy Access, Taxonomy Access Lite, Simple Access etc) in combination.
I don't know enough about the access control mechanisms to say if simplenews can grab the posts as anonymous (i.e. when running cron) that are not available to anonymous.
However - while this issue exists - simplenews users who have access control protected newsletter nodes cannot get cron based delivery.
I have hacked around this with the following perl script:
http://www.chrissearle.org/node/261
This logs in, grabs the cookie and thus runs cron as a logged in user who has access to the simplenews nodes themselves.
To summarize - its nothing to do with the "send newsletter" permission, and will not affect users who have newsletter nodes available to anonymous users.
Comment #8
enboig commentedAny progress with this? Changing cron.php to look like
would solve the problem?
Comment #9
sutharsan commentedSee #256795: Allow simplenews cron to send nodes that anonymous users cannot access for a patch.