Selaa lähdekoodia

Fixing WP import

svalavuo 4 päivää sitten
vanhempi
sitoutus
d006724d2e
1 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  1. 6 2
      includes/wordpress_import.php

+ 6 - 2
includes/wordpress_import.php

@@ -452,10 +452,14 @@ class WordPressImport {
                 $this->log("Placeholders: " . $placeholders);
                 $this->log("Parameter count: " . count($postIds));
                 $this->log("Executing publication mapping query with " . count($postIds) . " post IDs");
-                $pubStmt = $this->targetDb->query("
+                
+                // Use raw PDO for this query to avoid Database class parameter issues
+                $pdo = $this->targetDb->getConnection();
+                $pubStmt = $pdo->prepare("
                     SELECT id, wp_post_id FROM publications 
                     WHERE wp_post_id IN ($placeholders)
-                ", $postIds);
+                ");
+                $pubStmt->execute($postIds);
                 
                 foreach ($pubStmt->fetchAll() as $pub) {
                     // Map WordPress post ID to publication ID