Migrate module, long text issue I'm trying to migrate rows from a Joomla K2 table.

The issue happens when I add the 'fulltext' field to the field list on my select inside my migration class. This field is a medium text field with html inside. The error only happens when I put this field in the query.

The error is like so:


  Migration failed with source plugin exception: SQLSTATE[42000]: Syntax error or access violation: 1064 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 'fulltext FROM j3_k2_items n WHERE (catid IN ('43', '45', '46', '51', '68', '7' at line 1, 


I have set $this-&gt;source = new MigrateSourceSQL($query, array(), NULL, array('map_joinable' =&gt; FALSE)); but it didn't help.

Any ideas? I don't know what to do.
Ok, just found the problem.

I was using this select:

$query = $this-&gt;getConnection()-&gt;select('j3_k2_items', 'n')
  -&gt;fields('n', array('id', 'title', 'fulltext'))
  -&gt;condition('catid', array(43, 45, 46, 51, 68, 72, 109, 117),'IN');


but the array inside the fields was the problem. When I removed it:

$query = $this-&gt;getConnection()-&gt;select('j3_k2_items', 'n')
  -&gt;fields('n')
  -&gt;condition('catid', array(43, 45, 46, 51, 68, 72, 109, 117),'IN');


Which was the same as doing a "SELECT *" the error gone and the migration worked!