Explorar o código

Fixing WP import

svalavuo hai 4 días
pai
achega
52f5b357e2
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      includes/wordpress_import.php

+ 2 - 0
includes/wordpress_import.php

@@ -438,6 +438,7 @@ class WordPressImport {
             
             if (!empty($postIds)) {
                 $placeholders = str_repeat('?,', count($postIds) - 1) . '?';
+                $this->log("Executing publication mapping query with " . count($postIds) . " post IDs");
                 $pubStmt = $this->targetDb->query("
                     SELECT id, wp_post_id FROM publications 
                     WHERE wp_post_id IN ($placeholders)
@@ -476,6 +477,7 @@ class WordPressImport {
                     $parentId = null;
                     
                     // Insert comment
+                    $this->log("Executing INSERT for comment: '{$wpComment['comment_content']}' (Post ID: {$wpPostId})");
                     $this->targetDb->query(
                         "INSERT INTO comments (publication_id, parent_id, name, email, content, status, created_at, admin_reply, wp_comment_id) 
                          VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)",