Broken auth dialog for package update servers
authorAlexander Ebert <ebert@woltlab.com>
Fri, 3 Jun 2022 16:37:44 +0000 (18:37 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 3 Jun 2022 16:37:44 +0000 (18:37 +0200)
See https://www.woltlab.com/community/thread/295831-fehler-beim-update-beta-3-4/

ts/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Package/Update/Manager.js

index 4a54673937556a4f46f7d6ab22aa8142e4b59e73..e706e5813f333f2f166e825757c9e5a89e566da2 100644 (file)
@@ -187,7 +187,10 @@ class AcpUiPackageUpdateManager implements DialogCallbackObject {
     }
 
     if (isValid) {
-      const packageUpdateServerID = +this.submitButton.dataset.packageUpdateServerId!;
+      const dialog = document.getElementById("acpUiPackageUpdateManager")!;
+      const submitButton = dialog.querySelector('button[data-type="submit"]') as HTMLElement;
+
+      const packageUpdateServerID = parseInt(submitButton.dataset.packageUpdateServerId!, 10);
       const saveCredentials = (document.getElementById("packageUpdateServerSaveCredentials") as HTMLInputElement)
         .checked;
 
index abe0d4593a44c3dae615ce97fc9432c39c33cd4e..c8dd6bb9dd288bd6e888e2d0a4be9940f6af7eb3 100644 (file)
@@ -129,7 +129,9 @@ define(["require", "exports", "tslib", "../../../../Ajax", "../../../../Language
                 Util_1.default.innerError(passwordField, false);
             }
             if (isValid) {
-                const packageUpdateServerID = +this.submitButton.dataset.packageUpdateServerId;
+                const dialog = document.getElementById("acpUiPackageUpdateManager");
+                const submitButton = dialog.querySelector('button[data-type="submit"]');
+                const packageUpdateServerID = parseInt(submitButton.dataset.packageUpdateServerId, 10);
                 const saveCredentials = document.getElementById("packageUpdateServerSaveCredentials")
                     .checked;
                 void this.prepareUpdate({