Fix critical enhancement hanging bug caused by nil context in content injection
Replace nil context with context.Background() in content.go to prevent database operations from hanging indefinitely. Clean up outdated documentation files and add current project structure analysis.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package engine
|
||||
|
||||
import (
|
||||
"context"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
@@ -18,8 +19,8 @@ func (e *ContentEngine) injectContent(elements []ProcessedElement, siteID string
|
||||
for i := range elements {
|
||||
elem := &elements[i]
|
||||
|
||||
// Get content from database by ID
|
||||
contentItem, err := e.client.GetContent(nil, siteID, elem.ID)
|
||||
// Get content from database by ID - FIXED: Use context.Background() instead of nil
|
||||
contentItem, err := e.client.GetContent(context.Background(), siteID, elem.ID)
|
||||
if err != nil {
|
||||
// Content not found - skip silently (enhancement mode should not fail on missing content)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user