Documenting critical issues with the variant collection spreadsheet editor: - Column names not displaying in the UI - Data not persisting to database (complete data loss) Previous fixes applied but issue persists. Marked as DEFERRED for now. Users can use JSON textarea workaround until proper fix is implemented. Status: NOT PRODUCTION READY
3.1 KiB
3.1 KiB
TODO: Variant Collection Spreadsheet Editor Issues
Status: ⚠️ CRITICAL - NOT PRODUCTION READY
Issues Identified (November 14, 2025)
1. Column Names Not Displaying
- Symptom: Spreadsheet element is not showing column names/headers
- Impact: Users cannot see what properties they're editing
- Severity: HIGH - Makes editor unusable
2. Data Not Persisting to Database
- Symptom: Neither column headers nor cell values are saving to the database
- Impact: Complete data loss - all entered data is lost on save
- Severity: CRITICAL - Feature is completely broken
Previous Fixes Applied (Not Working)
-
✅ Removed overly aggressive column skip logic (commit
0dbc49e)- Changed from skipping "Property X" columns to only skipping truly empty names
- Result: Did not resolve the issue
-
✅ Fixed column rename persistence with immutable array updates
- Result: Visual updates work, but data still not persisting
-
✅ Added comprehensive console logging for debugging
- Status: Needs browser console inspection to see what's happening
Files Involved
/LittleShop/wwwroot/js/variant-editor.js- Main spreadsheet editor/LittleShop/Areas/Admin/Views/VariantCollections/Create.cshtml- Create view/LittleShop/Areas/Admin/Views/VariantCollections/Edit.cshtml- Edit view/LittleShop/Areas/Admin/Controllers/VariantCollectionsController.cs- Backend controller/LittleShop/Services/VariantCollectionService.cs- Service layer/LittleShop/DTOs/VariantCollectionDto.cs- Data transfer objects
Next Steps for Debugging
- Open browser console (F12) when testing the editor
- Check for JavaScript errors that might be preventing initialization
- Verify form submission - Check Network tab for POST request
- Inspect request payload - Verify PropertiesJson field is populated
- Test server-side - Add logging to controller Create/Edit methods
- Check Handsontable initialization - Verify library is loading correctly
Test URL
- Create: http://localhost:5000/Admin/VariantCollections/Create
- Login: admin / admin
Potential Root Causes to Investigate
- JavaScript not loading - Check for 404 errors on variant-editor.js
- Handsontable library issue - Verify handsontable.full.min.js is loading
- Form binding issue - Hidden input might not be in the right place
- Serialization timing - serializeToJSON() might not be called before submit
- View rendering issue - Razor view might have compilation errors
- Cache issues - Browser might be loading old JavaScript despite cache-busting
Workaround
Until this is fixed, variant collections can be created using the JSON textarea fallback:
[
{
"name": "Size",
"values": ["Small", "Medium", "Large"]
},
{
"name": "Color",
"values": ["Red", "Blue", "Green"]
}
]
Priority
DEFERRED - Proceeding with other development work. Will revisit when time permits.
Created: November 14, 2025 Last Updated: November 14, 2025 Assigned To: TBD Estimated Effort: 2-4 hours for proper debugging and fix