Hello !

Each time I tried to migrate comments, I got an error message saying that table comment could not be found. The error was supposed to be situated in database.inc ...
Instead, I discovered that if it search table comment, instead of table prefix_comment, it was because of some pairs of forgotten brackets.

So in plugins/destination/comment.inc, on line 225, you'll have to do add them twice (after each FROM), and get then :

$sql = "
        INSERT IGNORE INTO {node_comment_statistics} (nid, cid, last_comment_timestamp, last_comment_name, last_comment_uid, comment_count) (
          SELECT c.nid, c.cid, c.created, c.name, c.uid, c2.comment_count FROM {comment} c
          JOIN (
            SELECT c.nid, MAX(c.created) AS created, COUNT(*) AS comment_count FROM {comment} c WHERE status=:published GROUP BY c.nid
          ) AS c2 ON c.nid = c2.nid AND c.created=c2.created
        )";

Have a nice day !

Comments

mikeryan’s picture

Status: Patch (to be ported) » Needs review
mikeryan’s picture

Status: Needs review » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.