fix: show progress modal for pre-extension-update backup #196

Open
jmiller wants to merge 2 commits from fix/preupdate-backup-popup into main
Owner

Summary

  • The pre-update backup ran synchronously in onExtensionBeforeUpdate with no browser feedback — the page just hung until backup + update finished
  • System plugin now injects JavaScript on com_installer and com_joomlaupdate pages that intercepts the update button, shows a Bootstrap 5 modal with a progress bar, and runs the backup via the stepped AJAX API (ajax.init + ajax.step)
  • On completion it proceeds with the original update; on failure it shows Skip & Cancel buttons
  • Server-side onExtensionBeforeUpdate remains as a fallback for CLI/API updates, with a session flag to prevent double-running when JS already handled it

Test plan

  • Navigate to Extensions > Manage > Update, select an extension, click Update — modal should appear with progress bar
  • Verify backup completes and update proceeds automatically
  • Test backup failure scenario — Skip and Cancel buttons should appear
  • Verify Joomla Update page also shows the modal
  • Confirm CLI updates still run the server-side backup fallback

https://claude.ai/code/session_01MbEjBtsSjPuTWhqqrMS2wG

## Summary - The pre-update backup ran synchronously in `onExtensionBeforeUpdate` with no browser feedback — the page just hung until backup + update finished - System plugin now injects JavaScript on `com_installer` and `com_joomlaupdate` pages that intercepts the update button, shows a Bootstrap 5 modal with a progress bar, and runs the backup via the stepped AJAX API (`ajax.init` + `ajax.step`) - On completion it proceeds with the original update; on failure it shows Skip & Cancel buttons - Server-side `onExtensionBeforeUpdate` remains as a fallback for CLI/API updates, with a session flag to prevent double-running when JS already handled it ## Test plan - [ ] Navigate to Extensions > Manage > Update, select an extension, click Update — modal should appear with progress bar - [ ] Verify backup completes and update proceeds automatically - [ ] Test backup failure scenario — Skip and Cancel buttons should appear - [ ] Verify Joomla Update page also shows the modal - [ ] Confirm CLI updates still run the server-side backup fallback https://claude.ai/code/session_01MbEjBtsSjPuTWhqqrMS2wG
jmiller added 2 commits 2026-06-30 18:28:53 +00:00
fix: show progress modal for pre-extension-update backup
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 18s
430b25cea5
The pre-update backup ran synchronously in onExtensionBeforeUpdate with
no browser feedback — the page just hung until backup + update finished.

Now the system plugin injects JavaScript on com_installer and
com_joomlaupdate pages that intercepts the update button, shows a
Bootstrap modal with a progress bar, and runs the backup via the
stepped AJAX API (ajax.init + ajax.step). On completion it proceeds
with the original update. On failure it shows Skip & Cancel buttons.

The server-side handler remains as a fallback for CLI/API updates.
A session flag prevents double-running when JS already handled it.

Claude-Session: https://claude.ai/code/session_01MbEjBtsSjPuTWhqqrMS2wG
This pull request has changes conflicting with the target branch.
  • SECURITY.md
  • source/packages/com_mokosuitebackup/mokosuitebackup.xml
  • source/packages/com_mokosuitebackup/src/Controller/AjaxController.php
  • source/packages/mod_mokosuitebackup_cpanel/mod_mokosuitebackup_cpanel.xml
  • source/packages/plg_actionlog_mokosuitebackup/mokosuitebackup.xml
  • source/packages/plg_console_mokosuitebackup/mokosuitebackup.xml
  • source/packages/plg_content_mokosuitebackup/mokosuitebackup.xml
  • source/packages/plg_quickicon_mokosuitebackup/mokosuitebackup.xml
  • source/packages/plg_system_mokosuitebackup/mokosuitebackup.xml
  • source/packages/plg_task_mokosuitebackup/mokosuitebackup.xml
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/preupdate-backup-popup:fix/preupdate-backup-popup
git checkout fix/preupdate-backup-popup
Sign in to join this conversation.