From d5d2959caf127b70f607e5f1e39b1f61a7e5fc35 Mon Sep 17 00:00:00 2001 From: Pujit Mehrotra Date: Thu, 6 Nov 2025 14:45:35 -0500 Subject: [PATCH 1/3] fix: api version detection in UpdateFlashBackup.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/include/UpdateFlashBackup.php:415 still reads the API version from _var($mystatus,'version'), but commit 441e1805c removed the code that populates $mystatus (the parse of /var/local/emhttp/myservers.cfg). As a result $mystatus is undefined, so we now send api_version= to https://keys.lime-technology.com/backup/flash/activate. The PHP runtime also emits “Undefined variable: mystatus” / “Trying to access array offset on value of type null” notices before headers are written. Those notices corrupt the JSON response, the keyserver rejects the request because the api_version is missing, and the flash backup state file is never updated—so the web GUI stays stuck at “Loading”. Because the status request always invokes UpdateFlashBackup.php, every page load trips the same failure path, leaving /var/local/emhttp/flashbackup.ini with loading=Loading. The frontend only listens for /sub/flashbackup events, so until that INI file is rewritten the spinner never clears and the enable button never becomes active. --- .../plugins/dynamix.my.servers/include/UpdateFlashBackup.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/include/UpdateFlashBackup.php b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/include/UpdateFlashBackup.php index 32222e4318..5933aea414 100644 --- a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/include/UpdateFlashBackup.php +++ b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/include/UpdateFlashBackup.php @@ -32,6 +32,7 @@ } $isConnected = ($connectionStatus === 'CONNECTED') ? true : false; +$apiVersion = ApiConfig::getApiVersion(); $flashbackup_ini = '/var/local/emhttp/flashbackup.ini'; @@ -416,7 +417,7 @@ function deleteLocalRepo() { curl_setopt($ch, CURLOPT_POSTFIELDS, [ 'keyfile' => $keyfile, 'version' => _var($var,'version'), - 'api_version' => _var($mystatus, 'version'), + 'api_version' => ($apiVersion && $apiVersion !== 'unknown') ? $apiVersion : '', 'bzfiles' => implode(',', $bzfilehashes) ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); From e9bffda9aa2fb8345ebc2014639436197670fb84 Mon Sep 17 00:00:00 2001 From: Pujit Mehrotra Date: Thu, 6 Nov 2025 15:26:09 -0500 Subject: [PATCH 2/3] fix: UI updates to reflect flash activation --- .../plugins/dynamix.my.servers/Connect.page | 19 ++++++++++++++++++- .../include/UpdateFlashBackup.php | 2 ++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/Connect.page b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/Connect.page index 5cbce2f906..130da58db0 100644 --- a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/Connect.page +++ b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/Connect.page @@ -575,12 +575,30 @@ _(Flash backup)_: