feat: full-screen backup for all updates + uninstalls (Joomla 6 core + extensions) #240

Merged
jmiller merged 4 commits from fix/preupdate-j6-viewupdate into dev 2026-07-10 16:14:10 +00:00

4 Commits

Author SHA1 Message Date
mokogitea-actions[bot] 4e5bf99f61 chore(version): pre-release bump to 02.58.20-dev [skip ci]
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
2026-07-10 15:54:02 +00:00
jmiller 7a0636606e feat: full-screen backup for extension update/uninstall + view-record button
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 18s
Extend the full-screen backup screen beyond core Joomla updates:

- Extension updates/uninstalls (com_installer): update.update and
  manage.remove are POST + checkToken with a checked cid[] list, so a
  server-side GET redirect can't resume them. New client-side interceptor
  (installer-backup.js, injected via onBeforeCompileHead on the update and
  manage views) wraps Joomla.submitbutton, stores the selection, sends the
  browser to view=runbackup, and on return restores the selection and
  re-submits the real POST form. Gated by backup_before_update /
  backup_before_uninstall, super-user only, skipped within the throttle
  window.

- runbackup: on manual 'Backup Now' completion, show a 'View backup
  record' button (links to view=backup&id=<record_id>); not shown for the
  pre-update/uninstall flow (which hands back to Joomla). SteppedBackup
  Engine now returns record_id in its step result.

- runbackup arms the pre-action throttles on success (ajax.preupdateAck,
  now arming both update+uninstall keys) so the following server-side
  onExtensionBefore(Update|Uninstall) backup is skipped (no duplicate).

- Plugin manifest re-registers media/js.

NOTE: untested end-to-end (no dev build available this session) — verify
the com_installer resume flow on a dev build before relying on it.

Claude-Session: https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
2026-07-10 10:53:46 -05:00
mokogitea-actions[bot] a63b87d97c chore(version): pre-release bump to 02.58.19-dev [skip ci] 2026-07-09 23:23:12 +00:00
jmiller e56a1fd8f6 fix: pre-update full-screen backup fires on Joomla 4/5/6 (view=update)
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 16s
The redirect only matched task=update.install, which Joomla 4/5/6 do not
use. Their 'Install the update' flow server-side-redirects to the updating
page (view=update), which then extracts the downloaded package from
JavaScript (AJAX to com_joomlaupdate/extract.php). So the view=update page
LOAD is the last server-side moment before any files change.

Intercept that page load (in onAfterRoute, before com_joomlaupdate renders
it), redirect to the full-screen backup with a returnurl back to
view=update&is_backed_up=1, then the browser returns and the JS extraction
runs. update.finalise is deliberately NOT intercepted -- by then the files
are already extracted, too late for a pre-update backup. Legacy
task=update.install (Joomla 3) still handled.

Claude-Session: https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
2026-07-09 18:17:07 -05:00