Olafski's picture

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

Olafski's picture

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":

  • Add a new view at admin/structure/views/add.
  • In the wizard, choose: Show Simplenews subscription.
  • Choose "Create a page", Display format: Table
  • Hit "Continue and configure".
  • Important: In the views configuration screen, in the middle column under "Access", add an access restriction choosing an admin permisson or an admin role.
  • Add the fields Status and Source to the view.
  • Under Filter criteria, add a filter for the Source field, choose the operator "Contains", and add the value "blocked".
  • Save the view, have a look at the results:
    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).

Olafski's picture

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

  • The Simplenews module on the website has already been updated to the current version 1.x-1.2.3.
  • You have a database backup with an intact and largely up-to-date version of the simplenews_subscription table.

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.

  1. Set up a development website with an intact simplenews_subscription database table, or use an existing dev website with the intact table.
  2. Export the simplenews_subscription table from the dev website database, for example, using phpMyAdmin:
    • Go to the simplenews_subscription table and click the "Export" tab.
    • Check the "Custom - display all possible options" radio button.
    • Scroll down a bit and activate the "Add DROP TABLE / TRIGGER statement" option.
    • Click the "Export" button and save the SQL file on your computer.
  3. Go to your live website where newsletter subscriptions were mistakenly disabled.
  4. As a precaution, create a database backup, e.g. using the "Backup and Migrate" module.
  5. Import the simplenews_subscription table exported in step 2 into the table on your live website. Using phpMyAdmin:
    • Go to the simplenews_subscription table and click the "Import" tab.
    • Upload the SQL file you exported in step 2.
    • Click the "Import" button.
  6. Log in to your live website and check the number of subscriptions on the page with the path admin/config/services/simplenews. You can also use the view described in the previous comment.
  7. Once the subscription numbers are correct, run a cron job. If the numbers are still correct afterward, the subscriptions have been permanently restored.
Olafski's picture

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

  • You are able to use or install an older dev version of your Backdrop website from a backup. The site should contain Simplenews version 1.x-1.2.1 and an up-to-date list of newsletter subscriptions.
  • The Simplenews module on your live website has already been updated to the fixed version 1.x-1.2.3.

Step by Step

  1. Go to the dev website with the up-to-date list of newsletter subscriptions.
  2. Export the subscriptions as follows:
    • Go to the "Export" page with the path admin/people/simplenews/export.
    • Select active and subscribed users for one desired newsletter category and click the "Export" button.
    • Copy the list of email addresses, paste it into a text document, and save it to your computer.
    • Repeat the export process for other newsletter categories as needed.
  3. Import the subscription list:
    • Switch to your live website which uses the fixed Simplenews version.
    • Go to the "Mass subscribe" page with the path admin/people/simplenews/import.
    • Paste the addresses saved in step 2 into the "Email addresses" field.
    • Under "Subscribe to" further below, select the appropriate newsletter category.
    • Enable the "Force re-subscription" option.
    • Click the "Subscribe" button.
    • If the action was successful, you will see a message listing the imported addresses.
    • Repeat the import process for additional newsletter categories as needed.

Title: Simplenews 1.x-1.2.2 removes subscribers when using anonymous checkout with Ubercart

Hello,

I experienced an issue when updating Simplenews to version 1.x-1.2.2.

My site uses Ubercart with anonymous checkout enabled.

Here is how the setup works:

  • All new customers are automatically created as user accounts.
  • These accounts are immediately set to Status: Blocked.
  • This allows customers to place orders without registration (only email is required, no username/password).
  • The system identifies returning customers by their email address and links orders accordingly.
  • The username is automatically generated from the part of the email before the “@”.

At the same time, each new user is automatically subscribed to Simplenews:

Subscribe new account
Silent: A new user is automatically subscribed to this newsletter. The newsletter is not listed on the user registration page.

When sending newsletters, users receive an email with an unsubscribe link, and some users have unsubscribed over time.

The problem

After updating Simplenews to 1.x-1.2.2 and running cron for the first time, all subscribers were removed from the subscription list.

My assumption is that this happens because all users are in Blocked status.
In this setup, blocked users are not invalid users. They are real Ubercart customers created during anonymous checkout, and their blocked status is intentional.

This issue occurred on April 12, 2026, immediately after the update.

What I did

I restored a backup on a development copy of the site (on a different domain), using Simplenews 1.x-1.2.1.
All subscribers were restored correctly (total: 918).

Then I updated core and other modules, but kept Simplenews at 1.x-1.2.1.

Second test

Today I attempted the update again:

  • Updated Simplenews
  • Ran cron

Result:

  • Subscribers dropped from 918 to 240
  • Only 8 pages × 30 subscribers remained (instead of 32 pages total)

Current status

I restored the site again to the backup with Simplenews 1.x-1.2.1, and everything works correctly.

However, I am now stuck with an outdated version of Simplenews that I cannot safely update.

Recovery plan

Fortunately:

  • I have a full backup list of all 918 subscribers (exported as a text file)
  • I can also export current subscribers from the system (including newly added users)

From what I understand, the correct approach would be:

  1. Update Simplenews to 1.x-1.2.3
  2. Import the saved subscriber list

My question

What will happen with users who previously unsubscribed?

I want to avoid re-subscribing people who have explicitly opted out, as this would not be correct.

Is there a recommended way to:

  • Preserve unsubscribe status, or
  • Safely restore subscribers without violating user preferences?

Thanks in advance for any guidance.

Olafski's picture

@Amilenkov, I have an idea for your use case where you want to avoid re-subscribing people who have explicitly opted out:

Build a view of simplenews subscriptions, and filter by Status (value: zero or false) and Source (value: website). If I understand those filters correctly, the mentioned values should filter the results so that you get only subscriptions that have explicitly opted out.

Please doublecheck if my assumption about the filters is correct. If that's the case, the next step would be:

For the import into the site with Simplenews 1.x-1.2.3, remove the results from the filtered view from your subscriber list, and finally import this smaller list.

I hope this works! Apart from such a workaround, we should maybe open an issue in the Simplenews queue to discuss if the connection between user status and subscription status may be loosened, so that a blocked user account can still receive a newsletter. I think there are several valid use cases of blocked users who might want to receive a newsletter.

Thank you, this is a very useful workaround for preparing a clean import list.

One concern remains, however: if Simplenews 1.x-1.2.3 still treats blocked user accounts as invalid newsletter subscribers during cron, then imported subscriptions connected to blocked Ubercart customer accounts may be deactivated again on the next cron run.

I will test this on a development copy by importing a small set of blocked users, running cron, and checking whether their subscriptions remain active.

One more note:

In my opinion, user account status and newsletter subscription should be treated as separate concerns.

A blocked user account does not necessarily mean an invalid or unwanted email recipient. In cases like Ubercart anonymous checkout, blocked users are valid customers with real email addresses, and they may have explicitly subscribed to the newsletter.

Also, anonymous users can subscribe without having an account at all, which further supports the idea that subscription should not depend strictly on user status.

Perhaps the best approach would be to make this behavior configurable, so site owners can decide whether subscriptions should be affected by user status.

Olafski's picture

@Amilenkov, I agree with your thoughts regarding the relation between subscription and user status. Are you up to open an issue report in the Simplenews issue queue with the suggestion to make the behavior configurable?

Thank you for the suggestion and for helping clarify the possible relation between user status and newsletter subscriptions. 

I followed your advice and opened an issue in the Simplenews GitHub queue with detailed test results and reproduction steps:

https://github.com/backdrop-contrib/simplenews/issues/86