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:
- Before upgrading, have subscribers with subscriptions_status = 0 in the simplenews_subscriber__subscriptions table.
- Upgrade Simplenews to version 4 and run all update scripts.
- Navigate to /admin/people/simplenews to view the list of active subscribers.
- 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.