feat: full-screen backup screen for pre-update + Backup Now (Akeeba-style), fixes white screen #238
Reference in New Issue
Block a user
Delete Branch "feat/fullscreen-backup-screen"
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?
Replaces the popup-modal pre-update approach with a dedicated full-screen backup screen, modelled on Akeeba's Backup-on-Update — and fixes the white screen that occurred when clicking Update with
backup_before_updateon.Root cause of the white screen
The pre-update backup ran synchronously inside the update request (
onExtensionBeforeUpdate). On a large site (~123 MB) it exceeded the request's time/memory limits mid-backup → WSOD. (An immediate resource-limit safety net already shipped in #236; this PR removes the synchronous backup from the core-update path entirely.)What's new
view=runbackup— a full-page backup progress screen (View/Runbackup+tmpl/runbackup). It auto-starts the stepped backup (ajax.init→ loopajax.step) with a real progress bar, then:returnurlwas passed → redirects there (continues the update), elseAuto-resolved by the
MVCFactory(no controller/registration needed). Return URL is validated (same-host only) to prevent open redirects.com_joomlaupdate&task=update.installwithbackup_before_updateon, redirect to the full-screen screen withreturnurlback toupdate.install&is_backed_up=1. On return, the throttle is armed soonExtensionBeforeUpdatedoesn't run a duplicate backup. No backup runs synchronously in the update request.live_sitewarning — warns when Global Config Site URL is empty (CLI/scheduled naming + URL generation depend on it; a misconfigured live_site without scheme also just broke a test site).Removed (retired popup modal)
plg_system_mokosuitebackup/media/js/update-backup.js, the plugin<media>element,onBeforeCompileHeadinjection, and thepreupdate_auto_interceptcomponent param.Notes / scope
com_installer) and uninstalls still use the synchronousonExtensionBeforeUpdatebackup (now with raised limits from #236) — the seamless return-redirect is only practical for core Joomla updates (Akeeba does the same).AjaxController::preupdateAckis now unused but left in place (harmless); can be removed later.Verify
php -lclean on all changed PHP;config.xml+ plugin manifest well-formed.Refs #196
https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i