Commit Graph

7 Commits

Author SHA1 Message Date
Vladimir Bryzgalov 0cc1266912 release: 1.2.1 2026-05-01 20:20:29 +05:00
Vladimir Bryzgalov f510ac484a fix(cron): self-heal scheduled events on every boot + on plugin upgrade
Pilot on washanyanya.ru lost the cf7stg_dispatch cron event somewhere
between 21.04 and 01.05 — wp_next_scheduled('cf7stg_dispatch') returned
NULL, queue had 6 pending rows, sent-24h=0, failed=0, no error trail.
Settings/token were intact. The most likely cause is the PUC self-update
to 1.2.0: WordPress plugin upgrades replace files but do NOT call
register_activation_hook, so Activator::activate() never re-ran and any
cron event Activator::deactivate() had cleared (or that was lost for any
other reason) stayed missing.

Two-part fix:

1. Activator::ensure_scheduled() — extracted from the old private
   schedule_events(), now public and idempotent. wp_next_scheduled()
   short-circuits when events are already queued, so it's safe to call
   on every request. Plugin::boot() invokes it on plugins_loaded — every
   admin or front-end hit auto-heals lost cron events.

2. Activator::on_upgrade_complete() bound to upgrader_process_complete.
   When WordPress finishes upgrading THIS plugin (matched via
   plugin_basename + $hook_extra['plugins']), we re-run install_table()
   (idempotent dbDelta), seed_silent_drop_options() (uses add_option,
   preserves user values), and ensure_scheduled(). guard_requirements
   is intentionally skipped — wp_die mid-upgrade would leave admin in
   a broken state, and the host obviously meets requirements since the
   old version is currently running.

Tests untouched (this is integration code wrapping WP-only APIs); full
suite still 126/126 green.

Changelog entry for 1.2.1 added to readme.txt.
Stable tag and CF7STG_VERSION will be bumped by release.sh.

Refs: cp-1lg

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 20:19:34 +05:00
Vladimir Bryzgalov b0fb5c8e3d release: 1.2.0 2026-04-21 23:50:23 +05:00
Vladimir Bryzgalov 73045a1f0c docs(readme): add 1.2.0 changelog entry
Release body that release.sh will extract and POST to Gitea /releases API.
2026-04-21 21:11:07 +05:00
Vladimir Bryzgalov 030eaca408 chore: bump version to 1.1.0 with silent-drop changelog 2026-04-21 17:18:14 +05:00
Vladimir Bryzgalov 0cdfde9529 chore: bump version to 1.0.4 with changelog of pilot fixes
Header 'Version: 1.0.0' in the main plugin file was never bumped
while pilot fixes piled up (1.0.1 → 1.0.4 existed only in zip file
names). wp-admin → Plugins screen therefore kept showing 1.0.0
regardless of what was deployed.

Bumped:
- cf7-spam-to-telegram.php header Version 1.0.0 → 1.0.4
- CF7STG_VERSION constant 1.0.0 → 1.0.4
- readme.txt Stable tag 1.0.0 → 1.0.4
- readme.txt Changelog: entries for 1.0.2 / 1.0.3 / 1.0.4

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 00:39:11 +05:00
Vladimir Bryzgalov 6eb2844429 chore: uninstall cleanup, WP readme 2026-04-17 22:51:33 +05:00