From db556e532e3037464625466f3267b4300d813b50 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 6 Dec 2025 02:22:37 +0400 Subject: [PATCH] debug: add logging for instant deploy URL building MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added extensive logging to debug: - Initial configIds before pre-filling storage - Final configIds after pre-filling - Storage selection state - All configoption parameters being set in URL This will help identify why the deploy button after customization shows incorrect storage configuration. 🤖 Generated with [Claude Code](https://claude.com/claude.com) Co-Authored-By: Claude --- .../dedicatednodes-bare-metal/new-baremetal.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Documents/Vibe Coding Projects/dedicatednodes-redesign/dedicatednodes-bare-metal/new-baremetal.html b/Documents/Vibe Coding Projects/dedicatednodes-redesign/dedicatednodes-bare-metal/new-baremetal.html index 4c85cbc..58ab845 100644 --- a/Documents/Vibe Coding Projects/dedicatednodes-redesign/dedicatednodes-bare-metal/new-baremetal.html +++ b/Documents/Vibe Coding Projects/dedicatednodes-redesign/dedicatednodes-bare-metal/new-baremetal.html @@ -4899,6 +4899,7 @@ var wpcf7 = { // Fill slots based on storage requirements if (storageRequirements && storageRequirements.length > 0) { console.log("Pre-filling storage with requirements:", storageRequirements); + console.log("Initial configIds before pre-filling:", configIds); // Clear storageSelection to start fresh storageSelection = {}; @@ -4965,6 +4966,7 @@ var wpcf7 = { }); console.log("Final storageSelection:", storageSelection); + console.log("Final configIds after pre-filling:", configIds); } } else { // Pre-set configState for custom servers @@ -5467,18 +5469,25 @@ var wpcf7 = { const urlObj = new URL(selectedServer.orderUrl); const params = urlObj.searchParams; + console.log("Building Instant Order URL - ConfigIds:", configIds); + console.log("Building Instant Order URL - Storage Selection:", storageSelection); + // Update only the configuration options that are tracked in configIds Object.entries(configIds).forEach(([id, val]) => { if (id && val) { // WHMCS format: configoption[123] params.set(`configoption[${id}]`, val); + console.log(`Setting configoption[${id}] = ${val}`); } }); // Ensure billing cycle is enforced params.set('billingcycle', 'monthly'); - return urlObj.toString(); + const finalUrl = urlObj.toString(); + console.log("Final Instant Order URL:", finalUrl); + + return finalUrl; } catch (e) { console.error("Error building instant URL:", e); return selectedServer.orderUrl;