G'Day,

After no configuration changes and 10 successful newsletter editions have been sent, Simple News is now emptying the simplenews_snid_tid table at each cron run and immediately before each Newsletter send action.

I can see all my subscribers still in the *_subscriptions table. So I copy them out and re-paste into Simple News Import Subscribers, with the target newsletter ticked on.

I get a successful import message. The snid_tid table is populated.

I take no action and wait for cron to run. Wtchdog reports this:

User: admin

Location:http://www.crcplantbiosecurity.com.au/node/1425/edit?destination=admin%2Fcontent%2Fnewsletters%2Fnotsent

Referrer: http://www.crcplantbiosecurity.com.au/node/1425/edit?destination=admin%2Fcontent%2Fnewsletters%2Fnotsent

Message: Newsletter subscription list was automatically regenerated.

What is going on and how can I fix it?

D5.20 / Ubuntu

Thanks,

JB

Comments

boabjohn’s picture

Continuing:

I have installed the dev version, updated my Drupal to 5.22, and tested the database.

Every time I run cron, something emptys the simplenews_snid_tid table.

What can do this? Is it coming from the module itself? I searched for the text "regenerated" and found nothing in simplenews.module.

Desperate for a bit of help here...

Impossible to send the newsletter other than 20 at a time...when cron runs it sends the first batch, then the "subscription list auto regeneration" process runs, and dumps the list of subscribers.

End of sending.

HELP!!

sutharsan’s picture

Search for "simplenews_snid_tid" in all code on your site but especially in simplenews_* modules. Do you use Simplenews Roles module?

boabjohn’s picture

Just a quick follow-up on this one. I disabled the simplenews_roles module and have had no further problems.

There is a note somewhere about sn_roles performing an *exact* sync between subscribers and authenticated users (with roles). Apparently sn_roles will delete every subscriber that it doesn't find an exact user match for.

In my case 80% of the subscribers *were* authenticated users with configured roles, while the other 20% were self-subscribing public users.

Not sure why sn_roles kept dumping my entire snid_tid table, since most of the users should have matched fine (indeed, I can see valid UIDs for most of the rows in the subscriptions table).

Anyway, no time to post mortem further. I have dropped sn_roles and all is good.

Thanks for the clue!

sutharsan’s picture

Category: bug » support
Status: Active » Fixed
sutharsan’s picture

Title: snid_tid table truncated on cron: Newsletter subscription list was automatically regenerated » Prevent node deletion when newsletter is pending.
Version: 5.x-1.5 » 6.x-2.x-dev
Category: support » feature
Status: Fixed » Needs work

Changing state and title to solve this for future cases.

This may be realized by preventing the node from being deleted using hook_node_access(). I investigated this before, but only recently I discovered this hook.

miro_dietiker’s picture

Assigned: Unassigned » sutharsan

Sutharsan, could you please tell me why preventing the node from being deleted would improve the situation described?
I can't find any relation in the issue above.

simon georges’s picture

@miro_dieteker, Sutharsan, should we do something about this subject ?

miro_dietiker’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev

Simon

I don't know of any other module that does something like that.
We could also output a warning.

In Drupal 6 there's no clean way to implement this. Moving this to D7 where we can implement the hook cleanly.

Please try ;-)

simon georges’s picture

Status: Needs work » Needs review
StatusFileSize
new922 bytes

Please review ;-)

simon georges’s picture

Status: Needs review » Fixed

The patch above has been committed to 7.x-1.x.

Status: Fixed » Closed (fixed)

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