I have a case of many notices per cron run.

The methods...
SimplenewsSourceNode->getLanguage() (multiple times)
SimplenewsSourceNode->getRecipient() and
...all try to return properties of an invalid $source.

By investigating the code a little bit, I think all originate from simplenews_get_spool() which must be in my current setup be returning invalid sources.

My best guess is, there are subscriptions of deleted accounts. Cron likely tries to spool their newsletters. The mailing always fails, so they remain in the spooler. Just a guess!

Setting issue to major, because it accumulates and is capable on a site with many users to kill simplenews spooler (or even cron?) and flood watchdog.

A quick fix might be is to check the $source in simplenews_send_source() and - in case of an invalid object - assume success to proceed with the healthy spooler cleanup. This would not heal the original issue, but be helpful on affected production environments. I'd provide such a patch in case the issue doesn't get fixed contemporary.

#1 missing-subscribers-1739312-1.patch2.16 KBBerdir
PASSED: [[SimpleTest]]: [MySQL] 1,863 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


Berdir’s picture

Status: Active » Needs review
2.16 KB
PASSED: [[SimpleTest]]: [MySQL] 1,863 pass(es). View

Confirmed, this happens when a subscriber failed to load, because for example the user account has been deleted.

Berdir’s picture

Status: Needs review » Fixed


PatchRanger’s picture

I get these notices even with the latest dev when try to send a node that existed before Simplenews installation.
I have created separate issue : #1780134: Create newsletters for existing nodes.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Tested the quick fix already, it works.