Drupal - "Source database does not contain a recognizable Drupal version."

At this stage, I don't think there is a simple option to upgrade from 7 to 8. As you can see on the release note:

Once you are ready, Drupal 8 core also includes the Migrate module to update existing Drupal 7 and 6 sites to Drupal 8 directly. Migrate is marked "experimental" in Drupal 8.0.0, but will be fully supported in an upcoming release. https://www.drupal.org/news/drupal-8.0.0-released

A little bit technical behind the scene: From 7 to 8 version, they keep the same concept when building site (like node, entity, permission, views...) but not the core. I would say: they changed everything to OOP, Symfony component, architecture... So there is no way to upgrade your drupal site directly from decent version to 8.0, you have to migrate. Here is how the migrating process should look:

  1. Recreate the site with the same functionality to your d7 site.
  2. Recreate the theme (using twig template)
  3. Migrate content over

The cost to this process is (unfortunately) same to recreate a new site or more. With the no 3, take a look at this article by Phase 2: https://www.phase2technology.com/blog/upgrading-to-a-drupal-8-site/


Your error message is an exact match with the string contained in the line at http://cgit.drupalcode.org/migrate_upgrade/tree/src/MigrationCreationTrait.php#n40 within the code of the "Drupal Upgrade" module (https://www.drupal.org/project/migrate_upgrade).

It shows that it is not a bug, but instead an "exception being thrown". Looking at the 3 preceeding lines of that code, I think it is only a problem in setting up the connection.

Maybe this helps also:

  • a quote from issue https://www.drupal.org/node/2628440 (comment nr 3):

    To check that the source database is a valid Drupal database, and to determine the version of the database, the upgrade process looks at the 'system' table - is that table present in the database you specified in the form? Is the Drupal installation in that database prefixed (and if so, did you enter the prefix in the "Advanced options" section of the form)?".

  • Followed by comment nr 4 in that same issue: "Providing tables' prefix solved the issue.".

And of course, the comment from benjy (thank you!) would also help to get more details about the actual error you're running into, i.e.:

you could print out $e->getException() here cgit.drupalcode.org/migrate_upgrade/tree/src/… and then you'll see the PDO error

You could (temporary) add such print between lines 122 and 123 in the code shown via the link.

Tags:

Migration

8