fix: duplicate pre-update backup from system and content plugins #186
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Both
plg_system_mokosuitebackupandplg_content_mokosuitebackupsubscribe toonExtensionBeforeUpdateand both trigger a backup. The system plugin has a 10-minute throttle, the content plugin has a 1-hour throttle. Under certain timing conditions, two backups can run for a single update.Additionally, the content plugin subscribes to
onExtensionBeforeInstallandonExtensionBeforeUpdate— these are installer-group events in Joomla 6, not content-group events. The content plugin may be dead code for these events.Fix
Remove the extension event handlers from the content plugin (leave them in the system plugin only). Or consolidate into a single plugin.
Branch created:
feature/186-fix-duplicate-pre-update-backup-from-sysConfirmed still open @ 02.56.05 — keep open.
Both plugins still handle the update event:
plg_content_mokosuitebackup/src/Extension/MokoSuiteBackupContent.php:28-29subscribes toonExtensionBeforeInstallandonExtensionBeforeUpdate, whileplg_system_mokosuitebackup/src/Extension/MokoSuiteBackup.php:31also subscribes toonExtensionBeforeUpdate— so a single extension update triggers two pre-update backups. Fix: remove the installer-group event handlers from the content plugin (backups belong to the system plugin).