Problem/Motivation

Looks like they picked the wrong table in like 276. The status is stored in the user table not the simplenews_snid_tid table.

Proposed resolution

The patch should look like this i guess:
Index: sites/all/modules/simplenews_scheduler/simplenews_scheduler.module
===================================================================
--- sites/all/modules/simplenews_scheduler/simplenews_scheduler.module
+++ sites/all/modules/simplenews_scheduler/simplenews_scheduler.module
@@ -273,7 +273,7 @@
ON ss.uid = u.uid
INNER JOIN {simplenews_snid_tid} s
ON ss.snid = s.snid
- AND s.tid = %d AND s.status = 1';
+ AND s.tid = %d AND u.status = 1';

$result = db_query($query, $newsletter_tid);

Comments

dgtlmoon’s picture

Status: Active » Postponed (maintainer needs more info)

It looks like simplenews_snid_tid does have the 'status' column, this lets us know if someone's subscription to that termid (newsletter) is active or not, how did you get this error? which version of simplenews are you running?


  $schema['simplenews_snid_tid'] = array(
    'description' => 'Newsletter series subscription data.',
    'fields' => array(
       'snid' => array(
        'description' => 'The {simplenews_subscriptions}.snid who is subscribed.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'tid' => array(
        'description' => 'The newsletter series ({term_data}.tid) the subscriber is subscribed to.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'status' => array(
        'description' => 'A flag indicating whether the user is subscribed (1) or unsubscribed (0).',
        'type' => 'int',
        'size' => 'small',
        'not null' => TRUE,
        'default' => 1
      ),
dgtlmoon’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

check the version if simplenews you are running?