From 0dbc49ee8940657506d8fdec0ae6fd43e065c738 Mon Sep 17 00:00:00 2001 From: SysAdmin Date: Fri, 14 Nov 2025 00:35:55 +0000 Subject: [PATCH] fix: Critical data loss bug in variant editor - removed overly aggressive column skip logic Problem: Variant editor was skipping ALL columns with headers starting with 'Property ' (e.g., 'Property 1'), which caused complete data loss during serialization. When users entered data but didn't rename the default column header, serializeToJSON() would skip the column entirely, returning an empty array [] to the database. Fix: Only skip columns with truly empty names, not default 'Property X' names. Users can now save data even if they haven't renamed column headers. Files changed: - wwwroot/js/variant-editor.js: Removed propertyName.startsWith('Property ') check - Areas/Admin/Views/VariantCollections/Create.cshtml: Updated cache-busting to v=20251113d - Areas/Admin/Views/VariantCollections/Edit.cshtml: Updated cache-busting to v=20251113d --- .../Areas/Admin/Views/VariantCollections/Create.cshtml | 2 +- LittleShop/Areas/Admin/Views/VariantCollections/Edit.cshtml | 2 +- LittleShop/wwwroot/js/variant-editor.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/LittleShop/Areas/Admin/Views/VariantCollections/Create.cshtml b/LittleShop/Areas/Admin/Views/VariantCollections/Create.cshtml index 7b5291a..8146d06 100644 --- a/LittleShop/Areas/Admin/Views/VariantCollections/Create.cshtml +++ b/LittleShop/Areas/Admin/Views/VariantCollections/Create.cshtml @@ -74,7 +74,7 @@ - + - +