Hello,

I'm currently setting up my migration using Migrate module on a windows-based installation.
I defined my migration class, do the mappings, all is going fine for this. drush ms is showing my mapping correctly.
But when I try to use the migrate-import command on my mapping (named "artistcountry"), I got an error.

Here is the debug dump :

Bootstrap to phase 0. [0.07 sec, 1.74 MB] [bootstrap]

Drush bootstrap phase : _drush_bootstrap_drush() [0.07 sec, 1.89 MB] [bootstrap]

Bootstrap to phase 5. [0.18 sec, 3.76 MB] [bootstrap]

Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.18 sec, [bootstrap]

3.77 MB]
Initialized Drupal 7.0 root directory at C:/wamp/www/MI [0.23 sec, [notice]

4.79 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.23 sec, 4.8[bootstrap]

MB]
Initialized Drupal site default at sites/default [0.23 sec, 4.8 MB] [notice]

Drush has significant limitations on Windows. We seek a co-maintainer [warning]

to remedy them. See http://drupal.org/project/drush for more
information, and for instructions on disabling this warning. [0.27
sec, 4.8 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.27[bootstrap]

sec, 4.8 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.29 sec,[bootstrap]

4.81 MB]
Successfully connected to the Drupal database. [0.29 sec, 4.81 MB] [bootstrap]

Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.31 sec, [bootstrap]

5.29 MB]
Bootstrap to phase 6. [0.89 sec, 19.05 Mo] [bootstrap]

Drush bootstrap phase : _drush_bootstrap_drupal_login() [0.89 sec, [bootstrap]

19.05 Mo]
Successfully logged into Drupal as Anonyme (uid=0) [0.9 sec, 19.21 [bootstrap]

Mo]
Found command: migrate-import (commandfile=migrate) [0.9 sec, 19.21 [bootstrap]

Mo]
Initializing drush commandfile: user [0.9 sec, 19.21 Mo] [bootstrap]

WD php: Notice: Undefined index: artistcountry in [notice]

drush_migrate_get_migrations() (line 499 of
C:\wamp\www\MI\sites\all\modules\migrate\migrate.drush.inc). [0.99
sec, 20.18 Mo]
PHP Fatal error: Call to a member function getEnabled() on a non-object in C:\w
amp\www\MI\sites\all\modules\migrate\migrate.drush.inc on line 500

Fatal error: Call to a member function getEnabled() on a non-object in C:\wamp\w
ww\MI\sites\all\modules\migrate\migrate.drush.inc on line 500
Drush command terminated abnormally due to an unrecoverable error. [error]

Error: Call to a member function getEnabled() on a non-object in
C:\wamp\www\MI\sites\all\modules\migrate\migrate.drush.inc, line 500
[0.99 sec, 20.16 Mo]

Does anyone has an idea why he can't find my mapping there, whereas it's going well with other Drush commands? Might it be related to drush limitations on Windows?
Thank you by advance for your answers!

Comments

jjmackow’s picture

I'm getting the same issue on Linux, and I've jsut updated to the newest dev version (6.x-2.x-dev). I'll keep you posted on what I come up with, appreciate the same

metalrom’s picture

I kept going on the issue and try to switch my website to a linux VM... Even on Linux, I got the same error with exactly the same dump. I can't figure out what's going on... I guess I will try to import some rows of the migrate-example module, just to check if I have the same behavior.

metalrom’s picture

I made it work!

Actually it's quite nothing.
Following the "beer" example, I defined my class :

 class ArtistCountryMigration extends Migration
{
   ...
} 

and calls the migration-import command this way :
drush migrate-import artistcountry
Thing is, the drush command is case-sensitive, so the good call was ;
drush migrate-import ArtistCountry

It might be a good idea to correct this in the example beer.inc comments and highlight the case-sensitive aspect.

At least, it gave me the will to setup my development website on a Linux...

mikeryan’s picture

Title: Issue while using migrate-import drush command » Make drush import/rollback commands case-insensitive
Assigned: Unassigned » mikeryan
Category: support » bug

Yes, case-sensitivity is an issue I've meant to look at, but never put an issue in the queue to remind me. Thanks for reporting it, I'm looking at it now.

mikeryan’s picture

Status: Active » Fixed

Well, that was simple enough! Fix committed...

metalrom’s picture

Thanks for this quick fix!

Status: Fixed » Closed (fixed)

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