You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IP logging keeps getting re-enabled after updates #392
The "Log Blocked IPs" toggle keeps getting re-enabled after an update.
The behavior is very inconsistent. On some websites, this toggle was turned on after every recent update. On others, it remained disabled.
I noticed that on websites that use Redis, the problem occurs almost every time, whereas on those without Redis, it occurs only sometimes.
The Updates class ran a migration from the legacy wpzerospam option to per-module zero-spam-{module} options on every plugin version bump, not just once. Each time, it blindly overwrote current user settings with stale values from the old option — causing settings like "Log Blocked IPs" to re-enable themselves. The issue was more consistent on Redis-based sites because the old option persisted reliably in the object cache.
Fix (branch fix/392-settings-reset-on-update):
Replaced the Updates class with a Migrations runner that tracks completed migrations by unique key — each migration runs exactly once
The legacy migration now only fills in missing keys and never overwrites existing user settings
The stale wpzerospam option is deleted after migration with explicit cache flushing for Redis/Memcached
A one-time admin notice prompts users to verify their settings after upgrading
Files changed: includes/class-migrations.php (new), includes/class-updates.php (deleted), includes/class-plugin.php, core/admin/class-admin.php, core/admin/class-settings.php, uninstall.php
Activity
fix(settings): prevent settings from resetting on plugin update (#392)
Merge pull request #399 from Highfivery/fix/392-settings-reset-on-update
bmarshall511 commentedon Mar 16, 2026
Root cause identified and fixed.
The Updates class ran a migration from the legacy wpzerospam option to per-module zero-spam-{module} options on every plugin version bump, not just once. Each time, it blindly overwrote current user settings with stale values from the old option — causing settings like "Log Blocked IPs" to re-enable themselves. The issue was more consistent on Redis-based sites because the old option persisted reliably in the object cache.
Fix (branch fix/392-settings-reset-on-update):
Replaced the Updates class with a Migrations runner that tracks completed migrations by unique key — each migration runs exactly once
The legacy migration now only fills in missing keys and never overwrites existing user settings
The stale wpzerospam option is deleted after migration with explicit cache flushing for Redis/Memcached
A one-time admin notice prompts users to verify their settings after upgrading
Files changed: includes/class-migrations.php (new), includes/class-updates.php (deleted), includes/class-plugin.php, core/admin/class-admin.php, core/admin/class-settings.php, uninstall.php