Fix critical collection persistence bug where initial items disappeared after first enhancement by implementing database-first pattern with template-based reconstruction

This commit is contained in:
2025-09-22 21:50:18 +02:00
parent 09823d3e4d
commit 5f494b8aa8
5 changed files with 312 additions and 27 deletions

View File

@@ -174,3 +174,11 @@ func (m *MockClient) GetCollectionItems(siteID, collectionID string) ([]engine.C
func (m *MockClient) CreateCollectionTemplate(siteID, collectionID, name, htmlTemplate string, isDefault bool) (*engine.CollectionTemplateItem, error) {
return nil, fmt.Errorf("collection operations not implemented in MockClient")
}
func (m *MockClient) GetCollectionTemplates(siteID, collectionID string) ([]engine.CollectionTemplateItem, error) {
return nil, fmt.Errorf("collection operations not implemented in MockClient")
}
func (m *MockClient) CreateCollectionItem(siteID, collectionID, itemID string, templateID int, htmlContent string, position int, lastEditedBy string) (*engine.CollectionItemWithTemplate, error) {
return nil, fmt.Errorf("collection operations not implemented in MockClient")
}