Inactive subscribers listed as active after upgrading from Simplenews 3 to 4

Created on 30 November 2024, 4 months ago

After upgrading Simplenews from version 3 to version 4, we encountered an issue where subscribers with a subscriptions_status value of 0 (inactive) in the simplenews_subscriber__subscriptions table are now incorrectly listed as active in the Simplenews interface at /admin/people/simplenews.

This issue appears to be related to the upgrade scripts, specifically the updates related to hook_update_n:
ā€¢ 840007 (Delete unsubscribed subscriptions)
ā€¢ 840008 (Update subscriber subscriptions field)

It seems that inactive subscriptions were not properly handled during the migration, leading to their status being interpreted as active.

Steps to Reproduce:

  1. Before upgrading, have subscribers with subscriptions_status = 0 in the simplenews_subscriber__subscriptions table.
  2. Upgrade Simplenews to version 4 and run all update scripts.
  3. Navigate to /admin/people/simplenews to view the list of active subscribers.
  4. Observe that previously inactive subscribers are now listed as active.

Expected Behavior:
Subscribers with a subscriptions_status of 0 before the upgrade should remain inactive after the upgrade and should not appear in the list of active subscribers.

Actual Behavior:
Inactive subscribers are incorrectly listed as active after the upgrade.

Environment:

  • Simplenews version: 4.x
  • Drupal core version: 10.3.10
  • Database: MariaDB 10.6.16

Additional Notes:
This issue affects the accuracy of the subscriber list and could lead to unintentionally sending newsletters to inactive subscribers. As a temporary workaround, we are manually updating the subscriptions_status field in the database to correct the affected entries.

Proposed Solution:
Review the relevant update scripts (840007 and 840008) to ensure that subscribers with subscriptions_status = 0 are correctly handled during the upgrade process.

šŸ› Bug report
Status

Active

Version

4.1

Component

Code

Created by

šŸ‡©šŸ‡ŖGermany kreatIL

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kreatIL
  • šŸ‡©šŸ‡ŖGermany kreatIL

    It appears there has been a misunderstanding regarding the behavior of the /admin/people/simplenews page. By default, this page displays all subscribers, regardless of whether they are actively subscribed to a specific newsletter channel. This default behavior can give the impression that the total number includes only active channel subscribers, which is not the case.

    I hope this clarifies the situation, and I apologize for any confusion caused by this misunderstanding.

  • šŸ‡©šŸ‡ŖGermany kreatIL
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024