From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id CF6739069F for ; Fri, 24 Mar 2023 10:03:29 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4960089F7 for ; Fri, 24 Mar 2023 10:03:29 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 24 Mar 2023 10:03:27 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id C2ACC4669D for ; Fri, 24 Mar 2023 10:03:25 +0100 (CET) From: Friedrich Weber To: pve-devel@lists.proxmox.com Date: Fri, 24 Mar 2023 10:02:30 +0100 Message-Id: <20230324090230.33803-1-f.weber@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -1.355 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH widget-toolkit] fix #4612: mobile: avoid crash due to missing getProxy method X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Mar 2023 09:03:29 -0000 A previous commit (51083ee) added an override of the internal ExtJS method `Ext.data.Store.onProxyLoad` in order to fix a race condition. This override calls `Operation.getProxy`. However, this method is not available on Sencha Touch. As a consequence, the mobile UI was broken. This commit modifies the override such that it has no effect in the mobile UI. Fixes: 51083ee54aa98af5a711622e4ed240840dcbbabe Suggested-by: Dominik Csapak Signed-off-by: Friedrich Weber --- src/Utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Utils.js b/src/Utils.js index 7b7a83a..3200884 100644 --- a/src/Utils.js +++ b/src/Utils.js @@ -1483,10 +1483,11 @@ Ext.override(Ext.data.Store, { // If the store's proxy is changed while it is waiting for an AJAX // response, `onProxyLoad` will still be called for the outdated response. // To avoid displaying inconsistent information, only process responses - // belonging to the current proxy. + // belonging to the current proxy. However, do not apply this workaround + // to the mobile UI, as Sencha Touch has an incompatible internal API. onProxyLoad: function(operation) { let me = this; - if (operation.getProxy() === me.getProxy()) { + if (Proxmox.Utils.toolkit === 'touch' || operation.getProxy() === me.getProxy()) { me.callParent(arguments); } else { console.log(`ignored outdated response: ${operation.getRequest().getUrl()}`); -- 2.30.2