โ† All posts

Nice work. And thanks for the writeup. I agree that skipping a major version of Drupal is a reasonable way to proceed. Folks should look at migrate.module to help them do that. It is a bit more structured than a one off import thats custom built. Migrate is what Economist, Examiner, etc. use. So it can handle big and little projects.

I've used Migrate a few different times and found that for the most part it's more learning than it's worth. Either approach (entirely custom or migrate) still requires coding. In D7 the new consistency in save functions (like comment_save()) make custom scripts even easier than before. Unless I'm doing a lot of migrations (or continuous pulling from another system), the custom approaches take me significantly less time. Not to mention I'm not dependent on the stability of other modules for my migration.

Very glad I found this - web surfing always gets me at least one good wave. :) Thanks, Nate.

Thanks for the module and this page, but I have not been able to make it work. I get the following error message: An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /?q=batch&id=5&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cando_default.files' doesn't exist: SELECT COUNT(fid) AS count FROM {files} files; Array ( ) in custom_import_batch_files() (line 86 of /var/www/candobetter.local/sites/all/modules/custom_import/custom_import.module). (ends) My best understanding is the databases are supposed to be configured in ./site/default/settings.php Could someone please tell me if I am wrong? Assuming I am right, here is my database configuration: $databases['default']['legacy'] = array( 'driver' => 'mysql', 'database' => 'cando_legacy', 'username' => 'candolocal', 'password' => '#4^7dsa%8-', 'host' => 'localhost', 'prefix' => '', ); $databases['default']['default'] = array( 'driver' => 'mysql', 'database' => 'cando_default', 'username' => 'candolocal', 'password' => '#4^7dsa%8-', 'host' => 'localhost', 'prefix' => '', ); 'default' is the largely empty mysql database into which I intend to import 'legacy'. Could someone tell me if they can spot an error above, or, if not, what the cause of the problem might be?

This helped me a lot. I've never used the batch API before and this code was great for me. Looking at the example code, I think each batch method (i.e. custom_import_batch_comments) is only called once. When I'd expect it to be called multiple times. The $limit value is set, but never actually used in sql, so it runs over the full set.

hi i'm New to drupal.can you provide me the step by step process to migrate this

I got the same question how did you set up so Drupal can access the legacy database, I'm kind of confuse how to implement that.

From what I've read, the Migrate module makes it pretty easy to do imports with node / user references...since there's a bit of a chicken and egg problem with old nids / new nids. Is it worth it to adjust your code to implement something like this? Or do you think migrate is the way to go?

I'm hoping to use the Drupal-to-Drupal Data Migration module soon! http://drupal.org/project/migrate_d2d