From b4cd1e2a0b23ed5093213c8f939a9e8bcb3ce38c Mon Sep 17 00:00:00 2001 From: SimonFair <39065407+SimonFair@users.noreply.github.com> Date: Mon, 28 Sep 2026 14:51:44 +0100 Subject: [PATCH 1/2] fix(plugin): align downgrade request flow --- .../dynamix.plugin.manager/Downgrade.page | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.plugin.manager/Downgrade.page b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.plugin.manager/Downgrade.page index 87e8b639ec..c8be4e1984 100644 --- a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.plugin.manager/Downgrade.page +++ b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.plugin.manager/Downgrade.page @@ -117,14 +117,24 @@ function cleanupDiagnostics() { function startDowngrade() { $('div.spinner').show('slow'); - $.get( + $.post( '/plugins/dynamix.plugin.manager/include/Downgrade.php', - { - version: 'previousVersion ?>', + { action: 'prepare' }, + function(prepareResponse) { + $.post( + '/plugins/dynamix.plugin.manager/include/Downgrade.php', + { + nonce: prepareResponse.nonce, + confirm: 'yes', + version: 'previousVersion ?>', + }, + function() { + refresh(); + }, + 'json' + ); }, - function() { - refresh(); - } + 'json' ); } From 2953bf72a7881214bdb626c4a861b5a4f769be40 Mon Sep 17 00:00:00 2001 From: SimonFair <39065407+SimonFair@users.noreply.github.com> Date: Wed, 30 Sep 2026 15:40:36 +0100 Subject: [PATCH 2/2] fix(plugin): OS-907 report downgrade request failures Clear the progress spinner and show an actionable error when either downgrade POST request fails.\n\nRefs: OS-907\nReview: https://github.com/unraid/api/pull/2093#discussion_r4122991367 --- .../dynamix.plugin.manager/Downgrade.page | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.plugin.manager/Downgrade.page b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.plugin.manager/Downgrade.page index c8be4e1984..2624bd4024 100644 --- a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.plugin.manager/Downgrade.page +++ b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.plugin.manager/Downgrade.page @@ -114,6 +114,22 @@ function cleanupDiagnostics() { setTimeout(cleanupDiagnostics, 2000); } +function reportDowngradeError(xhr) { + $('div.spinner').hide('slow'); + + const response = xhr && xhr.responseJSON; + const message = response && response.error + ? response.error + : "_(Unable to complete the downgrade. Please try again.)_"; + + swal({ + title: "_(Downgrade failed)_", + text: message, + type: 'error', + confirmButtonText: "_(Ok)_", + }); +} + function startDowngrade() { $('div.spinner').show('slow'); @@ -132,10 +148,10 @@ function startDowngrade() { refresh(); }, 'json' - ); + ).fail(reportDowngradeError); }, 'json' - ); + ).fail(reportDowngradeError); } function confirmDowngrade() {