I discovered this issue testing migration of a live site from 1.x to 2.x (beta3), but was able to reproduce it against a fresh Drupal core install with bare-bones OG 7.x-1.x usage.
Problem/Motivation
When visiting migration page, the following errors appear:
- Class OgMigrateAddFields no longer exists
- Class OgMigrateContent no longer exists
- Class OgMigrateUser no longer exists
- Class OgUiMigrateAddField no longer exists
- Class OgUiSetRoles no longer exists
If you proceed anyway to attempt migration, the following error appears:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal.d6_og' doesn't exist in migrate_migrations() (line 41 of /var/www/html/drupal-7.17/sites/all/modules/contrib/migrate/migrate.module).
Steps to reproduce:
- Clean install Drupal 7.17
- drush dl og-7.x-1.5
- drush en og og_context og_access og_ui og_field_access og_register
- allow it to download and enable entity
- Visit site
- rebuild permissions
- Create a content type named 'Group', marked as a group type. Add a node of type Group.
- Create a content type named 'Post', marked as a group content type. Add a node of type Post.
- download additional modules for use with og-7.x-2.x
- drush dl ctools migrate entityreference entityreference_prepopulate views_bulk_operations views
- drush en ctools migrate migrate_ui entityreference entityreference_prepopulate views_bulk_operations views
- drush dl og-7.x-2.0-beta3
- drush updatedb
- drush cc all
- Visit site
- Go to Content | Migrate to see errors described at top of this report
Proposed resolution
I was able to work around this issue by testing for upgrade from D6 (rather than D7 OG 1.x) in og_migrate_api and og_ui_migrate_api. Not sure whether it is the right fix for all cases, but it worked for me. I will attach a patch to this issue.
Comment | File | Size | Author |
---|---|---|---|
#2 | migrate-og-to-og-class-deps-1845152-2.patch | 2.67 KB | danylevskyi |
#1 | og-1xto2xMigration-1845152.patch | 2.35 KB | ericjak |
Comments
Comment #1
ericjak CreditAttribution: ericjak commentedComment #2
danylevskyiericjak, thanks for your patch, but it isn't full.
If you make fresh install without 7.x-1.5 you'll get next warnings:
How to reproduce
Here is a patch, that fixes these warnings.
It worked for me.
Comment #3
danylevskyiComment #4
amitaibuCommitted, thanks.
Comment #5
dianacastillo CreditAttribution: dianacastillo commentedHi, where do I go to download this latest version of migrate that has this fixed? thanks, diana
Comment #6
danylevskyiYou should use 7.x-2.x-dev version.
Comment #7
scottAtRoot802 CreditAttribution: scottAtRoot802 commentedI'm also seeing these errors and continue to see them after applying #2.
Comment #8
danylevskyiVery strange. I can't reproduce it. Please, checkout 7.x-2.x-dev branch.
Comment #9
torrance123 CreditAttribution: torrance123 commentedWe still have these 'Class ... no longer exists' errors and receive the PDOException if we attempt the upgrade anyway. This blocks the upgrade path from 1.x to 2.x.
I'm using the latest dev version and have manually checked that the patch in #2 is applied (if I attempt to patch, patch exclaims "Reversed (or previously applied) patch detected!").
Comment #10
scottAtRoot802 CreditAttribution: scottAtRoot802 commentedYes, I was using 7.x-2.0-beta3+2-dev. I updated to the latest 7.x-2.0-beta3+6-dev version this morning, but I'm still getting the 'Class ... no longer exists' errors. I even tried restoring the server back to it's original state, before the migration (running OG 7.x-1.5), and then re-initiating the migration steps. Still, the errors persist.
Comment #11
guillaumev CreditAttribution: guillaumev commentedUninstall the migrate module completely (ie don't just disable it), then reinstall it and the error messages should disappear...
Comment #12
scottAtRoot802 CreditAttribution: scottAtRoot802 commentedThat fixed it. At least it fixed the 'Class .. no longer exists' error. Now I get an incomplete migration with an "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry..." error. Now, I'm off to research that issue. Thanks for your help with this one.
Comment #13.0
(not verified) CreditAttribution: commentedAdded a step - drush cc all