A bug was recently discovered in the Simplenews module that can cause numerous newsletter subscriptions to be incorrectly deactivated. The bug was introduced in Simplenews version 1.x-1.2.2 and fixed in version 1.x-1.2.3. However, the fix does not include an option to reactivate newsletter subscriptions that were previously deactivated by mistake.
This forum post is intended to provide tips on how to restore affected newsletter subscriptions.
Comments
This is the report about the recently discovered bug: https://github.com/backdrop-contrib/simplenews/issues/83.
First, how do you know if your site is affected? In other words: Are there any incorrectly deactivated newsletter subscriptions on your site?
The number of subscriptions are listed by newsletter category at the path
admin/config/services/simplenews.If the numbers on that page look lower than expected, I'd recommend to build a Subscriptions view and check if there are any results with a source value of "blocked user":
admin/structure/views/add.Are there any results with Source "blocked user"? How many? More than you would have expected?
If you get more results with Source "blocked user" than expected, you may want to check if those are blocked user accounts (then the submissions have been disabled as expected) or if they are anonymous users (then the submissions have been disabled erroneously).
Restore Newsletter Subscriptions from a Database Backup
One of my websites was affected by the Simplenews issue, and there were many incorrectly disabled newsletter subscriptions of 'anonymous' users on the site.
Restoring the whole website from a backup wasn't an option in my case, as the website content had changed too much when I discovered the issue. I was however able to restore the submissions from a specific database table with the steps described below.
Prerequisites
simplenews_subscriptiontable.Restoring Subscriptions, Step by Step
Disclaimer: Restoring subscriptions requires editing the database, which is not without risk. Make sure you create a database backup, and only perform the following steps if you are comfortable working with a database.
simplenews_subscriptiondatabase table, or use an existing dev website with the intact table.simplenews_subscriptiontable from the dev website database, for example, using phpMyAdmin:simplenews_subscriptiontable and click the "Export" tab.simplenews_subscriptiontable exported in step 2 into the table on your live website. Using phpMyAdmin:simplenews_subscriptiontable and click the "Import" tab.admin/config/services/simplenews. You can also use the view described in the previous comment.Restore Newsletter Subscriptions from a Dev Website
In my last comment, I described a way to restore newsletter subscriptions from a database backup. The method involved directly editing the database, which is not without risk. Therefore, I describe an alternative approach here that utilizes the export and import functionality of the Simplenews module.
Prerequisites
Step by Step
admin/people/simplenews/export.admin/people/simplenews/import.