LogicException: The database driver has no TransactionManager implementation

Created on 26 March 2025, about 1 month ago

Problem/Motivation

When running a migration using a Microsoft SQL Server database as the source I encountered this error:

LogicException: The database driver has no TransactionManager implementation in /app/web/core/lib/Drupal/Core/Database/Connection.php:1114

I expect it could occur in other situations as well, though database reads at least don't seem to encounter the error from what I can tell.

I am running the module on Drupal 11 using the patch from https://www.drupal.org/project/sqlsrv/issues/3509478 🐛 Module doesn't work with Drupal 11 Active , so it could be a D11 specific issue. Though it seems the MySQL transaction manager was added in D10.

Steps to reproduce

For me the issue occurred after I:

  1. Added a new database connection in settings.php for my migration source database using this driver
  2. Added a custom migration source plugin (no sqlsrv specific code)
  3. Added migration group config referencing my new database connection
  4. Added migration config for a migration in that group using my custom plugin as a source
  5. Attempted to actually run the migration (the migrate status works fine). The migration reported it successfully imported an item, but displayed the error above afterwards. A node was created by the migration, I'm not sure whether the error actually caused any immediate problems aside from displaying the error.

Proposed resolution

Add a TransactionManager.

🐛 Bug report
Status

Active

Version

4.4

Component

Code

Created by

🇨🇦Canada dylan donkersgoed London, Ontario

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024