Closed (cannot reproduce)
Project:
Migrate
Version:
7.x-2.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 May 2013 at 10:36 UTC
Updated:
21 May 2013 at 20:18 UTC
Hi all, I have this class:
class MigrateMhtNotizieCommentiMigration extends MigrateMhtAbstractCommentMigration {
public function __construct() {
$arguments = array();
$arguments['whr'] = 3;
$arguments['wid'] = 172
$arguments['commentCT'] = 'comment_node_notizie';
$arguments['migrateFrom'] = 'MigrateMhtNotizie';
parent::__construct($arguments);
}
}In this (little) class I want to import only "comments" form my "notizie" with id = 172.
At "admin/content/migrate" page I see that migrate calculate 2 rows to import, and this is correct.
MIGRATION: MigrateMhtNotizieCommenti
TOTAL ROWS : 2
IMPORTED: 0
UNIMPORTED : 2
I "import" the MigrateMhtNotizieCommenti's migrate and I see this message:
Processed 2 (2 created, 0 updated, 0 failed, 0 ignored) in 0 sec (6939/min) - done with 'MigrateMhtNotizieCommenti'
And it's correct, and if I see the notizie's node I see 2 comments. All ok.
But in the summary page I read:
MIGRATION: MigrateMhtNotizieCommenti
TOTAL ROWS : 2
IMPORTED: 1
UNIMPORTED : 1
Why ?
Comments
Comment #1
mikeryanGood question - please look at the migrate_map_migratemhtnotiziecommenti table, in particular at the "needs_update" column. It sounds like one of the rows in there will have a value of 2 (MigrateMap::STATUS_IGNORED), although it's weird that the comment would still actually be imported. Unless perhaps your MigrateMhtNotizieCommentiMigration has a prepareRow() that is not checking the value returned by parent::prepareRow, and the parent is trying to ignore the orw?
Comment #2
mikeryanNo further information provided.