Hi,

first many thx for this great module !

When I run :
drush migrate import content_set

all items are imported. Good ! But if I want come back and run :
drush migrate clean content_set

all created nodes are not deleted and migrate status report items unimported.

When I use online dashboard, I can import and delete them right.
I have miss something ?

Best regards.

Comments

mikeryan’s picture

Category: bug » support
Status: Active » Fixed

It's "clear", not "clean". drush migrate clear content_set works fine for me.

mentat.fr’s picture

Oups ... thx for reply.

Sorry bad typo I mean
drush migrate clear content_set

doesn't work on my server.

mentat.fr’s picture

Title: drush migrate clean fail ? » drush migrate clear fail ?

Upgrade my drush module, but
drush migrate clear content_set
always fail to delete nodes.

drush migrate status
show me items in the unimported state, but nodes are always in drupal.

Any idea ?
thx

mikeryan’s picture

Status: Fixed » Active

Can you try

drush migrate clear content_set -d

And see if that reports anything interesting? If we can't reproduce it, it's hard for us to fix it. If you're a developer, you might try temporarily putting some drush_print statements into key places (e.g., node_migrate_delete_node() in node.inc and migrate_content_process_clear() in migrate.module) to try to figure out where it's going wrong.

mentat.fr’s picture

Thanks for your reply,
here the report :

Drush bootstrap phase : _drush_bootstrap_drupal_root( [0.021sec] [bootstrap]
Initialized Drupal 6.14 root directory at /path2/drupal [0.029sec] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.032sec] [bootstrap]
Initialized Drupal site default at sites/default [0.054sec] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.056sec] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.062sec] [bootstrap]
Successfully connected to the Drupal database. [0.062sec] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.068sec] [bootstrap]
Including non-version specific file : /path2/drush/commands/core/drupal/environment.inc [0.192sec] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_login() [0.279sec] [bootstrap]
Found command: migrate clear [0.281sec] [bootstrap]
46 previously-imported items deleted in 1.1 seconds (2524/min) - done clearing 'content_set' [0.434sec] [notice]
Command dispatch complete [0.434sec]  [notice]
Timer 'page' is  0.378 sec. [0.434 sec] [timer]
Timer 'delete query' is  0 sec. [0.343sec] [timer]
Timer 'clear map/msg' is  0 sec. [0.434 sec]

The 46 items wasn't delete in drupal indeed drush seem to report it well.

Here the modules enable on my drupal 6.14 install:

Administration menu             6.x-1.5            
 Drupal                          6.14              
 Calendar                        6.x-2.x-dev      
 Computed Field                  6.x-1.0-beta3   
 Content Construction Kit (CCK)  6.x-2.5        
 Content Taxonomy                6.x-1.0-rc2   
 Date                            6.x-2.4      
 Devel                           6.x-1.18     
 Migrate                         6.x-1.x-dev 
 Schema                          6.x-1.6    
 Table Wizard                    6.x-1.x-dev
 Views                           6.x-2.6   
 Views Checkboxes                6.x-1.x-dev

Sorry I'm not as good developper to follow your recommandations to put drush trace.
Is this report give you some clues about what's going wrong ?

Best regards.

mentat.fr’s picture

Hi mikeryan,

I just make a try of the dev version.

drush migrate clear content_set
Always fail.

Try the new drush wipe option :
drush migrate wipe content_type
Fail too.

Wipe content type and clear content set works on http migrate dashboard/tools pages.

Try drush_print statement :
in node.inc put under function node_migrate_delete_node($nid)
drush_print(dt("delete node ").$nid);
The return list of nodes id is correct, so maybe the problem is inside :
node_delete($nid);

moshe weitzman’s picture

Status: Active » Postponed (maintainer needs more info)

If the problem is in node_delete, then thats a core bug. I cannot reproduce this bug.

moshe weitzman’s picture

Status: Postponed (maintainer needs more info) » Fixed

Actually, this only worked with --user=1 or similarly priveleged uid. I have changed the command in HEAD so it adds that for you.

mentat.fr’s picture

Hi moshe,

I upgrade the dev version.

drush migrate clear content_set
fail again.

But

drush migrate wipe content_type
Work perfectly ...

So I need to make an import follow by a clear and a wipe content type command before import new content.

Big thanks moshe, you unlock me even if the clear option is a better solution ...

moshe weitzman’s picture

Woops. Just applied same fix for clear command.

mentat.fr’s picture

All commands work perfectly now !
Many thanks again moshe for your help and your skill .

Status: Fixed » Closed (fixed)

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