feat: full-screen backup screen for pre-update + Backup Now (Akeeba-style), fixes white screen #238

Merged
jmiller merged 2 commits from feat/fullscreen-backup-screen into dev 2026-07-06 03:58:05 +00:00
Owner

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_update on.

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 → loop ajax.step) with a real progress bar, then:
    • if a validated returnurl was passed → redirects there (continues the update), else
    • shows a completion panel; on error, offers Retry / Continue without backup / Back to dashboard.
      Auto-resolved by the MVCFactory (no controller/registration needed). Return URL is validated (same-host only) to prevent open redirects.
  • System plugin redirect (Akeeba pattern): on com_joomlaupdate&task=update.install with backup_before_update on, redirect to the full-screen screen with returnurl back to update.install&is_backed_up=1. On return, the throttle is armed so onExtensionBeforeUpdate doesn't run a duplicate backup. No backup runs synchronously in the update request.
  • Dashboard "Backup Now" now opens the same full-screen screen (with the selected profile) instead of an inline modal.
  • Dashboard live_site warning — 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, onBeforeCompileHead injection, and the preupdate_auto_intercept component param.

Notes / scope

  • Extension updates (com_installer) and uninstalls still use the synchronous onExtensionBeforeUpdate backup (now with raised limits from #236) — the seamless return-redirect is only practical for core Joomla updates (Akeeba does the same).
  • AjaxController::preupdateAck is now unused but left in place (harmless); can be removed later.

Verify

  • php -l clean on all changed PHP; config.xml + plugin manifest well-formed.
  • Will functionally verify on suite.dev after the dev build (full-screen screen renders, backup runs, update continues).

Refs #196

https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i

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_update` on. ## 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` → loop `ajax.step`) with a real progress bar, then: - if a validated `returnurl` was passed → redirects there (continues the update), else - shows a completion panel; on error, offers **Retry** / **Continue without backup** / **Back to dashboard**. Auto-resolved by the `MVCFactory` (no controller/registration needed). Return URL is validated (same-host only) to prevent open redirects. - **System plugin redirect (Akeeba pattern):** on `com_joomlaupdate&task=update.install` with `backup_before_update` on, redirect to the full-screen screen with `returnurl` back to `update.install&is_backed_up=1`. On return, the throttle is armed so `onExtensionBeforeUpdate` doesn't run a **duplicate** backup. **No backup runs synchronously in the update request.** - **Dashboard "Backup Now"** now opens the same full-screen screen (with the selected profile) instead of an inline modal. - **Dashboard `live_site` warning** — 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, `onBeforeCompileHead` injection, and the `preupdate_auto_intercept` component param. ## Notes / scope - Extension updates (`com_installer`) and uninstalls still use the synchronous `onExtensionBeforeUpdate` backup (now with raised limits from #236) — the seamless return-redirect is only practical for core Joomla updates (Akeeba does the same). - `AjaxController::preupdateAck` is now unused but left in place (harmless); can be removed later. ## Verify - `php -l` clean on all changed PHP; `config.xml` + plugin manifest well-formed. - Will functionally verify on suite.dev after the dev build (full-screen screen renders, backup runs, update continues). Refs #196 https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
jmiller added 1 commit 2026-07-06 03:56:28 +00:00
feat: full-screen backup screen for pre-update + Backup Now (Akeeba-style)
Universal: PR Check / Wiki Update Reminder (pull_request) Has been skipped
Universal: PR Check / Require Docs Update (pull_request) Has been skipped
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Universal: PR Check / Secret Scan (pull_request) Successful in 7s
Generic: Project CI / Lint & Validate (pull_request) Successful in 12s
Universal: PR Check / Validate PR (pull_request) Failing after 13s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 49s
Generic: Project CI / Tests (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
8cfa46d985
Replace the popup-modal pre-update approach with a dedicated full-page
backup screen, modelled on Akeeba Backup-on-Update, and fix the white
screen caused by running a backup synchronously inside the update request.

- New view=runbackup (View/Runbackup + tmpl/runbackup): full-screen
  progress page that auto-starts the stepped backup (ajax.init -> loop
  ajax.step), then redirects to a validated returnurl on completion or
  shows a completion/retry panel. Auto-resolved by MVCFactory.
- System plugin: on com_joomlaupdate task=update.install (when
  backup_before_update is on), redirect to the full-screen backup screen
  with returnurl back to update.install&is_backed_up=1; on return, arm the
  throttle so onExtensionBeforeUpdate does not run a duplicate backup. No
  synchronous backup in the update request.
- Dashboard 'Backup Now' navigates to the full-screen screen instead of
  the inline modal; the inline modal + stepped JS are removed.
- Retire the popup modal: delete media/js/update-backup.js, remove the
  plugin <media> element and the preupdate_auto_intercept param.
- Dashboard: warn when Global Config live_site is empty (CLI/scheduled
  backup naming + URL generation depend on it).

Refs #196

Claude-Session: https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
jmiller added 1 commit 2026-07-06 03:57:50 +00:00
fix(security): enforce scheme allow-list on runbackup return URL
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Universal: PR Check / Require Docs Update (pull_request) Has been skipped
Universal: PR Check / Wiki Update Reminder (pull_request) Has been skipped
Universal: PR Check / Secret Scan (pull_request) Successful in 9s
Generic: Project CI / Lint & Validate (pull_request) Successful in 14s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
Universal: PR Check / Validate PR (pull_request) Failing after 14s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 1m8s
Generic: Project CI / Tests (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
4311ec8f99
The pre-update return URL is assigned to window.location.href, so a
javascript:/data: URI (empty host) would have passed the host-only check
and executed. Require an absolute http(s) same-host URL or a single-slash
root-relative path; reject javascript:/data:/vbscript: and protocol-relative
//host.

Claude-Session: https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
jmiller merged commit 746629bf02 into dev 2026-07-06 03:58:05 +00:00
jmiller deleted branch feat/fullscreen-backup-screen 2026-07-06 03:58:06 +00:00
Sign in to join this conversation.