Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using the wizard, and import is about to start, a ConnectionNotDefinedException is raised, and execution is interrupted. Basically Migrate seems to be looking for a database, when we do not need any here since the source is an XML file. Is this somehow triggered by Wordpress Migrate, or is it strictly a bug from in the Migrate module? How could we fix it, is there a workaround?
Comments
Comment #2
FMB CreditAttribution: FMB commentedUpdated issue summary. Wordpress Migrate appears to be non-functional at the current time: can this be fixed in this module, or do we have to wait until it is fixed in the Migrate module itself (see related issues)? Attached the call stack at the time of the crash (please note that the patch from #2700693: [meta] Make MigratePluginManager::getDefinitions() work cleanly with migrate_drupal enabled was applied, so a RequirementsException is raised instead of a ConnectionNotDefinedException, but the issue is fundamentally the same).
Comment #3
HongPong CreditAttribution: HongPong as a volunteer and at kor group commented+1 also having this problem. Hmm..
Comment #4
HongPong CreditAttribution: HongPong as a volunteer and at kor group commentedInterestingly I got a major chunk of my WP import to actually work.
Applied this patch: https://www.drupal.org/files/issues/2830036-28.patch in #2830036: MigrationPluginManager::getDefinitions() blows up in node derivers. That got past the previous error.
I could see the import was primed to go. Not sure where to start it. Went over to drush.
This should be caught better:
Then this:
I open the Content admin page and to my surprise all the blog posts are in. But the post categories have become gibberish like
bochahichiuarostuvakochohunonafruclatruhoji , brekoslesachipichadrutorastowrojodrocruuovacrushutakiburamahap etc. Impressive.
Surprised I got this far considering #2573241: Support adding migrations through the UI is a thing.
At /admin/structure/migrate/manage/my_wordpress_blog/migrations I get :
Migration / machine name / status / total / imported / unprocessed:
Import from WordPress XML blog_wordpress_categories Idle 1 22 -21
So somehow a negative number is unprocessed. In my case I can just not import categories and find another way to set them. Pleasant to get this far and avoid that much data entry, but wow. I will reset my imports and take another spin at it. Interesting stuff, probably almost close enough for our purposes.
Comment #5
berliner CreditAttribution: berliner commentedWorkaround as described in http://drupal.stackexchange.com/a/227732/8881 is working for me:
Comment #6
splash112 CreditAttribution: splash112 as a volunteer commentedIs this still current or can be marked as fixed? Seems to work fine (with migrate_tools 4.x dev) on my setup.
Comment #7
HongPong CreditAttribution: HongPong as a volunteer and commentedYes I believe the upstream issue about nonexistent databases was resolved thanks splash112. If anyone runs into this again please reopen.