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:

  1. Clean install Drupal 7.17
  2. drush dl og-7.x-1.5
  3. drush en og og_context og_access og_ui og_field_access og_register
    • allow it to download and enable entity
  4. 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.
  5. 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
  6. drush dl og-7.x-2.0-beta3
  7. drush updatedb
  8. drush cc all
  9. 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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ericjak’s picture

danylevskyi’s picture

Title: Migration from 7.x-1.x to 7.x-2.0-beta3 fails with simple repro steps » 'Class no longer exists' problem
Version: 7.x-2.0-beta3 » 7.x-2.x-dev
Status: Active » Needs review
FileSize
2.67 KB

ericjak, thanks for your patch, but it isn't full.
If you make fresh install without 7.x-1.5 you'll get next warnings:

Class OgMigrateMembership no longer exists
Class OgMigrateRoles no longer exists
Class OgMigrateUserRoles no longer exists

How to reproduce

  1. Create fresh install of og-7.x-2.x-dev and migrate-7.x-2.5.
  2. Go to 'admin/content/migrate'

Here is a patch, that fixes these warnings.
It worked for me.

danylevskyi’s picture

Version: 7.x-2.x-dev » 7.x-2.0-beta3
amitaibu’s picture

Status: Needs review » Fixed

Committed, thanks.

dianacastillo’s picture

Hi, where do I go to download this latest version of migrate that has this fixed? thanks, diana

danylevskyi’s picture

You should use 7.x-2.x-dev version.

scottAtRoot802’s picture

Status: Fixed » Needs work

I'm also seeing these errors and continue to see them after applying #2.

  • 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
danylevskyi’s picture

Very strange. I can't reproduce it. Please, checkout 7.x-2.x-dev branch.

torrance123’s picture

We 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!").

scottAtRoot802’s picture

Yes, 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.

guillaumev’s picture

Status: Needs work » Fixed

Uninstall the migrate module completely (ie don't just disable it), then reinstall it and the error messages should disappear...

scottAtRoot802’s picture

That 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.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Added a step - drush cc all