When I have the option "Use the migrate extras master node map" enabled, I get the following error for each record being migrated:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE sourceid='2'' at line 3 query: SELECT needs_update FROM WHERE sourceid='2' in sites/all/modules/migrate_extras/migrate_extras.module on line 242.

The table name is missing from the sql query. It looks like the wrong key is used for the $maptables array. Attached patch fixes this.

Cheers,
Stella

CommentFileSizeAuthor
#2 master_node_map2.patch679 bytesderikson
master_node_map.patch616 bytesstella

Comments

frankcarey’s picture

This seems to have done the trick. Will update dev as soon as I have a spare min.

derikson’s picture

StatusFileSize
new679 bytes

The problem is that $mcsid is never given a value, so the table name is always stored in $maptables[null]. When you attempt to get the value later using the real mcsid, the key doesn't exist so the value is null. The previous patch doesn't correctly fix the problem, but this one should.

frankcarey’s picture

@derickson - you patch didn't apply cleanly try using cvs diff?

$> patch -p0 --dry-run < master_node_map2.patch 
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/migrate_extras.module b/migrate_extras.module
|index b072a0c..cd4db61 100644
|--- a/migrate_extras.module
|+++ b/migrate_extras.module
--------------------------

I'm applying the first patch for now to dev to at least solve the issue for now.

frankcarey’s picture

Status: Needs review » Fixed

@ derickson - please just reopen when you have a new patch.

Committed to dev

Status: Fixed » Closed (fixed)

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