- Issue created by @Nicolas S.
- Status changed to Needs review
11 months ago 10:43am 22 December 2023 - Open on Drupal.org →Core: 10.1.x + Environment: PHP 8.1 & MySQL 5.7last update
11 months ago Waiting for branch to pass - Status changed to Closed: cannot reproduce
11 months ago 11:18am 22 December 2023 - 🇪🇸Spain plopesc Valladolid
Hi Nicolas,
Path Redirect Import 2.0.8 requires Migrate Tools 6.0.2 and the MigrateToolsCommands class path has been updated accordingly.
Could you please confirm the path_redirect module version you installed in sour site?
Marking the issue as Cannot Reproduce. If your problems persist, please reopen it adding as much details as possible.
Thank you!
- 🇮🇳India Pitabas
Hi @plopesc,
I appreciate your contribution.
I'm currently in the process of upgrading my site to Drupal ^10.1, and I've encountered some errors when running the Drush updatebd command. I've ensured that all dependencies and module versions, including `Migrate Tools 6.0.2` and Path `Redirect Import 2.0.8``, are correctly installed.
As per your last comment, I've confirmed that I haven't used the "path_redirect" module on my site. However, I'm still encountering the following errors and would appreciate your assistance in resolving this issue:
Error: Class "Drupal\migrate_tools\Drush\MigrateToolsCommands" not found in /web/modules/contrib/path_redirect_import/src/Drush/Commands/PathRedirectImportCommands.php on line 29 #0 /web/vendor/composer/ClassLoader.php(576): include() #1 /web/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}() #2 [internal function]: Composer\Autoload\ClassLoader->loadClass() #3 /web/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(192): ReflectionClass->__construct() #4 /web/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(174): Drush\Runtime\LegacyServiceInstantiator->instantiateObject() #5 /web/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(131): Drush\Runtime\LegacyServiceInstantiator->create() #6 /web/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(60): Drush\Runtime\LegacyServiceInstantiator->instantiateServices() #7 /web/vendor/drush/drush/src/Boot/DrupalBoot8.php(257): Drush\Runtime\LegacyServiceInstantiator->loadServiceFiles() #8 /web/vendor/drush/drush/src/Boot/DrupalBoot8.php(233): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands() #9 /web/vendor/drush/drush/src/Boot/BootstrapManager.php(236): Drush\Boot\DrupalBoot8->bootstrapDrupalFull() #10 /web/vendor/drush/drush/src/Boot/BootstrapManager.php(422): Drush\Boot\BootstrapManager->doBootstrap() #11 /web/vendor/drush/drush/src/Application.php(225): Drush\Boot\BootstrapManager->bootstrapMax() #12 /web/vendor/drush/drush/src/Application.php(191): Drush\Application->bootstrapAndFind() #13 /web/vendor/symfony/console/Application.php(266): Drush\Application->find() #14 /web/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun() #15 /web/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run() #16 /web/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun() #17 /web/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run() #18 /web/vendor/drush/drush/drush(4): require('...') #19 /web/vendor/bin/drush(119): include('...') #20 {main} Error: Class "Drupal\migrate_tools\Drush\MigrateToolsCommands" not found in include() (line 29 of /web/modules/contrib/path_redirect_import/src/Drush/Commands/PathRedirectImportCommands.php). [warning] Drush command terminated abnormally.
Your help in debugging and finding a solution would be greatly appreciated.
Thank you again for your contribution.
Best regards,
Pitabas - Status changed to Active
11 months ago 5:55am 26 December 2023 -
plopesc →
committed c8ac869c on 2.0.x authored by
Nicolas S. →
Issue #3410487 by Nicolas S.: "Drupal\migrate_tools\Commands\...
-
plopesc →
committed c8ac869c on 2.0.x authored by
Nicolas S. →
- Status changed to Fixed
11 months ago 6:39am 26 December 2023 - 🇪🇸Spain plopesc Valladolid
As part of 📌 Move Drush commands from src/Drush/ to src/Drush/Commands/ Fixed , location of Drush commands in Migrate Tools module has been modified, so having both modules in -dev version gives a missing dependency error.
Pushing equivalent change to path_redirect_import/2.0.x-dev. A new stable version will be released once migrate_tools reflects the change above in a stable release.
Thank you
- 🇫🇷France Nicolas S. Lyon, France
Thanks you @plopesc, problem that I had was well described by @Pitabas, it was during a D9.5 to D.10 migration
- Status changed to Needs review
11 months ago 10:27am 26 December 2023 - last update
11 months ago Patch Failed to Apply - 🇫🇷France Nicolas S. Lyon, France
Sorry but, with last version 2.0.x-dev, I have already the same error on drush cim/updb even after a drush cr
Why simply extends DrushCommands instead of MigrateToolsCommands ?
The command "/var/www/html/activateurdeprogres/vendor/bin/drush updatedb --no-cache-clear --uri=http://activateurdeprogres.localhost --root=/var/www/html/activateurdeprogres/www" failed.
Exit Code: 1(General error)
Working directory:
Output:
================
Error: Class "Drupal\migrate_tools\Drush\MigrateToolsCommands" not found in include() (line 30 of /var/www/html/activateurdeprogres/www/modules/contrib/path_redirect_import/src/Drush/Commands/PathRed
irectImportCommands.php).Error Output:
================
[error] Error: Class "Drupal\migrate_tools\Drush\MigrateToolsCommands" not found in include() (line 30 of /var/www/html/activateurdeprogres/www/modules/contrib/path_redirect_import/src/Drush/Comman
ds/PathRedirectImportCommands.php) #0 /var/www/html/activateurdeprogres/vendor/composer/ClassLoader.php(571): include()
#1 /var/www/html/activateurdeprogres/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#3 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Boot/DrupalBoot8.php(341): method_exists()
#4 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Boot/DrupalBoot8.php(324): Drush\Boot\DrupalBoot8->hasStaticCreateFactory()
#5 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Boot/DrupalBoot8.php(253): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands()
#6 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Boot/BootstrapManager.php(291): Drush\Boot\DrupalBoot8->bootstrapDrupalFull()
#7 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Boot/BootstrapManager.php(432): Drush\Boot\BootstrapManager->doBootstrap()
#8 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Boot/BootstrapManager.php(384): Drush\Boot\BootstrapManager->bootstrapToPhaseIndex()
#9 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Boot/BootstrapHook.php(32): Drush\Boot\BootstrapManager->bootstrapToPhase()
#10 /var/www/html/activateurdeprogres/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(44): Drush\Boot\BootstrapHook->initialize()
#11 /var/www/html/activateurdeprogres/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(36): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDis
patcher->doInitializeHook()
#12 /var/www/html/activateurdeprogres/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(29): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDis
patcher->callInitializeHook()
#13 /var/www/html/activateurdeprogres/vendor/consolidation/annotated-command/src/CommandProcessor.php(145): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->initialize()
#14 /var/www/html/activateurdeprogres/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(376): Consolidation\AnnotatedCommand\CommandProcessor->initializeHook()
#15 /var/www/html/activateurdeprogres/vendor/symfony/console/Command/Command.php(221): Consolidation\AnnotatedCommand\AnnotatedCommand->initialize()
#16 /var/www/html/activateurdeprogres/vendor/symfony/console/Application.php(1039): Symfony\Component\Console\Command\Command->run()
#17 /var/www/html/activateurdeprogres/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand()
#18 /var/www/html/activateurdeprogres/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#19 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Runtime/Runtime.php(124): Symfony\Component\Console\Application->run()
#20 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Runtime/Runtime.php(51): Drush\Runtime\Runtime->doRun()
#21 /var/www/html/activateurdeprogres/vendor/drush/drush/drush.php(79): Drush\Runtime\Runtime->run()
#22 /var/www/html/activateurdeprogres/vendor/drush/drush/drush(4): require('...')
#23 /var/www/html/activateurdeprogres/vendor/bin/drush(117): include('...')
#24 {main}.
Error: Class "Drupal\migrate_tools\Drush\MigrateToolsCommands" not found in /var/www/html/activateurdeprogres/www/modules/contrib/path_redirect_import/src/Drush/Commands/PathRedirectImportCommands.ph
p on line 30 #0 /var/www/html/activateurdeprogres/vendor/composer/ClassLoader.php(571): include()
#1 /var/www/html/activateurdeprogres/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#3 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Boot/DrupalBoot8.php(341): method_exists()
#4 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Boot/DrupalBoot8.php(324): Drush\Boot\DrupalBoot8->hasStaticCreateFactory()
#5 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Boot/DrupalBoot8.php(253): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands()
#6 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Boot/BootstrapManager.php(291): Drush\Boot\DrupalBoot8->bootstrapDrupalFull()
#7 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Boot/BootstrapManager.php(432): Drush\Boot\BootstrapManager->doBootstrap()
#8 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Boot/BootstrapManager.php(384): Drush\Boot\BootstrapManager->bootstrapToPhaseIndex()
#9 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Boot/BootstrapHook.php(32): Drush\Boot\BootstrapManager->bootstrapToPhase()
#10 /var/www/html/activateurdeprogres/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(44): Drush\Boot\BootstrapHook->initialize()
#11 /var/www/html/activateurdeprogres/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(36): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDis
patcher->doInitializeHook()
#12 /var/www/html/activateurdeprogres/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(29): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDis
patcher->callInitializeHook()
#13 /var/www/html/activateurdeprogres/vendor/consolidation/annotated-command/src/CommandProcessor.php(145): Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->initialize()
#14 /var/www/html/activateurdeprogres/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(376): Consolidation\AnnotatedCommand\CommandProcessor->initializeHook()
#15 /var/www/html/activateurdeprogres/vendor/symfony/console/Command/Command.php(221): Consolidation\AnnotatedCommand\AnnotatedCommand->initialize()
#16 /var/www/html/activateurdeprogres/vendor/symfony/console/Application.php(1039): Symfony\Component\Console\Command\Command->run()
#17 /var/www/html/activateurdeprogres/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand()
#18 /var/www/html/activateurdeprogres/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#19 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Runtime/Runtime.php(124): Symfony\Component\Console\Application->run()
#20 /var/www/html/activateurdeprogres/vendor/drush/drush/src/Runtime/Runtime.php(51): Drush\Runtime\Runtime->doRun()
#21 /var/www/html/activateurdeprogres/vendor/drush/drush/drush.php(79): Drush\Runtime\Runtime->run()
#22 /var/www/html/activateurdeprogres/vendor/drush/drush/drush(4): require('...')
#23 /var/www/html/activateurdeprogres/vendor/bin/drush(117): include('...')
#24 {main}
[warning] Drush command terminated abnormally. - Status changed to Postponed: needs info
11 months ago 10:33am 26 December 2023 - 🇪🇸Spain plopesc Valladolid
It extends MigrateToolsCommands because makes use of several methods declared in that class.
Extending DrushCommands would trigger other errors.
Reading the error log above, I think you don't have the expected module versions installed. Migrate Tools 6.0.2 & Path Redirect Import 2.0.8 are the expected ones.
Could you please indicate the exact version of each module you have installed in your site?
- 🇫🇷France Nicolas S. Lyon, France
I use Migrate tools 6.0.2 & Path Redirect Import 2.0.8
I delete module/custom/path_redirect_import and do a composer install to be sure to have the lastest version and my drush deploy failed
However I can clearly see the change in PathRedirectImportCommands.php - Status changed to Postponed
11 months ago 10:58am 26 December 2023 - Status changed to Postponed: needs info
11 months ago 11:22am 26 December 2023 - 🇪🇸Spain plopesc Valladolid
Hi Nicolas,
I don't know the exact internals of your project, but I checked again Migrate Tools & Path Redirect Import codebase and I don't see any broken class reference.
According to https://git.drupalcode.org/project/migrate_tools/-/blob/6.0.2/src/Drush/..., Migrate Tools commands are declared in Drupal\migrate_tools\Drush\MigrateToolsCommands in 6.0.2
According to https://git.drupalcode.org/project/path_redirect_import/-/blob/2.0.8/src..., Path Redirect Import references class Drupal\migrate_tools\Drush\MigrateToolsCommands in 2.0.8
Do you have any patch or any other customization to any of the modules that leads to that error?
Thank you
- 🇫🇷France Nicolas S. Lyon, France
Hi plopesc,
I'm according to you, because when I can access the class on click control under my IDE. There is no custom code so I am confused. I will continue via xdebug because it blocks my version upgrade to D10
- 🇮🇳India Pitabas
Hi @plopesc,
Thanks for the update.
After upgrading to the `path_redirect_import/2.0.x-dev ` i am getting the following error:
You have requested a non-existent parameter "plugin.manager.migration".
- 🇦🇹Austria kevin.pfeifer
I can also confirm that I run into this error after trying to upgrade my Drupal 9.5 instance to Drupal 10.2 with the path_redirect_import 2.0.8 module.
What is curious to me is the fact, that drush seems to require a different version of the migrate_tools than what is currently required by the 2.0 version of this module
-> % composer why drupal/migrate_tools drupal/path_redirect_import 2.0.8 requires drupal/migrate_tools (^6.0.2) drush/drush 12.4.3 conflicts drupal/migrate_tools (<= 5)
I imagine this could be related to why this problem currently appear
- 🇫🇷France Nicolas S. Lyon, France
Hi @plopesc,
It's ok for last version of path_redirect_import. My problem was that the modules which were dependent were not activated.
- 🇬🇧United Kingdom joehuggans Harrogate, UK
I'm also seeing this error on a site that is in the progress of being upgraded to D10. It happens when I try to run a drush command like drush uli.
I've checked the module versions and they are correct it seems:
Path redirect import: 2.0.8
Migrate tools: 6.0.2PHPstorm isn't showing any issues with the extending of MigrateToolsCommands, i.e. Drupal\migrate_tools\Drush\MigrateToolsCommands; is found.
Error: Class "Drupal\migrate_tools\Drush\MigrateToolsCommands" not found in /var/www/html/web/modules/contrib/path_redirect_import/src/Drush/Commands/PathRedirectImportCommands.php on line 29 #0 /var/www/html/vendor/composer/ClassLoader.php(576): include()
#1 /var/www/html/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}('/var/www/html/w...')
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass('Drupal\\path_red...')
#3 /var/www/html/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(192): ReflectionClass->__construct('\\Drupal\\path_re...')
#4 /var/www/html/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(174): Drush\Runtime\LegacyServiceInstantiator->instantiateObject('\\Drupal\\path_re...', Array)
#5 /var/www/html/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(131): Drush\Runtime\LegacyServiceInstantiator->create('\\Drupal\\path_re...', Array, Array)
#6 /var/www/html/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(60): Drush\Runtime\LegacyServiceInstantiator->instantiateServices(Array)
#7 /var/www/html/vendor/drush/drush/src/Boot/DrupalBoot8.php(257): Drush\Runtime\LegacyServiceInstantiator->loadServiceFiles(Array)
#8 /var/www/html/vendor/drush/drush/src/Boot/DrupalBoot8.php(233): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands(Object(Drush\Boot\BootstrapManager))
#9 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(236): Drush\Boot\DrupalBoot8->bootstrapDrupalFull(Object(Drush\Boot\BootstrapManager), NULL)
#10 /var/www/html/vendor/drush/drush/src/Commands/core/LoginCommands.php(71): Drush\Boot\BootstrapManager->doBootstrap(5)
#11 [internal function]: Drush\Commands\core\LoginCommands->login('', Array)
#12 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array)
#13 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#14 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#15 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(391): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#16 /var/www/html/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/html/vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/html/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run(Array)
#23 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
#24 /var/www/html/vendor/bin/drush(119): include('/var/www/html/v...')
#25 {main}
Error: Class "Drupal\migrate_tools\Drush\MigrateToolsCommands" not found in include() (line 29 of /var/www/html/web/modules/contrib/path_redirect_import/src/Drush/Commands/PathRedirectImportCommands.php). - 🇬🇧United Kingdom joehuggans Harrogate, UK
@Nicolas S - could you explain in more detail what worked for you? As it could help others.
- 🇦🇹Austria kevin.pfeifer
For me it was easiest to just uninstall the module before the Drupal 10 Upgrade.
- 🇬🇧United Kingdom joehuggans Harrogate, UK
Thanks Kevin, it does look like you found the issue i.e. conflicts drupal/migrate_tools (<= 5) , but I will try confirm.
This issue seems to be related - https://www.drupal.org/project/path_redirect_import/issues/3276865 🐛 Compatibility with Migrate Tools ^6.0 Fixed
- 🇹🇷Turkey emircan erkul Turkey
@Joe Huggans did u find anything?
I'm also facing the same issue. I use path_redirect_import dev and migrate tool with Drush 12's required folder path patch ( https://www.drupal.org/files/issues/2023-11-23/3403792-2.patch → ).
But I'm still stuck and still getting `Error: Class "Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands" not found in include() (line 30 of /app/docroot/modules/contrib/path_redirect_import/src/Drush/Commands/PathRedirectImportCommands.php).`
- 🇩🇪Germany Schoenef Unna
For me a upgrade to ^2.0 instead of 2.0-dev@dev worked fine.
- 🇬🇧United Kingdom joehuggans Harrogate, UK
@emircanerkul sorry no, no resolution was found at my end, another Dev picked up the work from me and he hasn't reported back what worked, I'll try get them to confirm if they fixed it.
- 🇹🇷Turkey emircan erkul Turkey
Thank you @Joe Huggans,
I solved mine. My problem was more like an unsynced database issue. Even core.extension says the module is installed it looks like installed but not its dependencies. Uninstalling and installing this module solved. Of course when u try to uninstall it gives same error. Just need to disable services manually (removing drush.services.yml and the command file in /Drush/Commands folder (which automatically loaded))
Using Drush 12, Core 10.2.1, path_redirect_import dev branch, migrate tool with https://www.drupal.org/files/issues/2023-11-23/3403792-2.patch →
- 🇺🇸United States Jon Pugh Newburgh, NY
Both modules have made the change needed in dev branches only.
Until there is a new release, you have to require the dev versions.
composer require drupal/path_redirect_import:2.0.x-dev drupal/migrate_tools:6.0.x-dev
To confirm, open up the files PathRedirectImportCommands.php and MigrateToolsCommands.php, and check the namespace.
In path_redirect_import, it reads:
use Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands;
In MigrateToolsCommands it should read:
namespace Drupal\migrate_tools\Drush\Commands;
HOWEVER....
It still doesn't work on my site, because somehow, Migrate Tools was disabled but path_redirect_import is still enabled.
Maybe this will work for you?
- Status changed to Active
10 months ago 2:05pm 1 February 2024 - 🇺🇸United States Jon Pugh Newburgh, NY
Is that a problem people are having? Migrate Tools is not installed?
The dependency on migrate_tools was only added a year ago and I am not seeing an update hook to enable it.
https://git.drupalcode.org/project/path_redirect_import/-/commit/b0c4dd1...
- Status changed to Postponed: needs info
10 months ago 2:22pm 1 February 2024 - 🇪🇸Spain plopesc Valladolid
Hi,
2.x branch is a complete rearchitecture of the module and there is no automatic upgrade path between versions, because it requires to download and install the dependencies.
An update hook without downloading the dependencies first, would throw other kind of exceptions.
Nowadays, to make it work, it is possible to have both modules in the latest stable version or in the -dev version.
- 🇬🇧United Kingdom alton306
Hi guys,
I had this issue today today and while its not really a fix its more of a work around, i found that temporally deleting path_redirect_module and then making sure migrate_tools is enabled should do the trick. Once thats done you can put the path_redirect_module back in place and it should work at least it did for me.
- 🇫🇷France StephaneQ Paris 🇫🇷
Hi @plopesc,
Just to let you know, Migrate Tools today released stable version 6.0.4 with change from #3403792.
- Status changed to Needs review
10 months ago 7:10pm 6 February 2024 - last update
10 months ago Patch Failed to Apply - 🇺🇸United States pookmish
Providing a patch for the latest version of migrate_tools.
This issue breaks all Drush commands with these two module. This is a critical issue.
- 🇪🇸Spain plopesc Valladolid
Thank you for the heads up @StephaneQ.
Released a new version to adapt the code to latest changes in Migrate Tools 6.0.4.
Hope it solves the inconsistencies mentioned above.
- 🇫🇷France StephaneQ Paris 🇫🇷
Thank you, I no longer have any problems on my side with the latest stable versions of the two modules.
- Status changed to RTBC
10 months ago 4:44am 8 February 2024 - 🇳🇱Netherlands Krilo_89
Patch #32 is working and really small. Please merge this asap.
- 🇪🇸Spain plopesc Valladolid
@Krilo_89
Please update both Path Redirect Import and Migrate Tool to their latest stable versions and the incompatibility issues should be gone.
Thank you!
- 🇳🇱Netherlands Krilo_89
HI @plopesc, indeed!
Migrate Tools had a security update, therefore Path Redirect Import should also be updated, that's correct.
But I will change the version for this issue, because this patch will not work with 2.0.8 and later.
Actually doesn't work with latest stable version (2.0.9 for path redirect import and 6.0.4 for migrate tools)
I'm using php 8.1 and Drupal 10.1.8I still have the error:
[error] Error: Class "Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands" not found in include() (line 30 of /var/www/html/new-d10/web/modules/contrib/path_redirect_import/src/Drush/Commands/PathRedirectImportCommands.php) #0 /var/www/html/new-d10/vendor/composer/ClassLoader.php(576): include()
The path seems correct :
Migrate tools :namespace Drupal\migrate_tools\Drush\Commands
Path redirect import :
use Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands
- 🇺🇸United States Jon Pugh Newburgh, NY
MathMadd I think that can happen if migrate_tools is not enabled which can happen if you installed path_redirect_import before version 2.
Thanks a lot Jon, it work now.
If someone got the same prob, i've completely remove path redirect import (DB and code) and reinstall with latest stable version.
Migrate tool was already enable but in doubt, juste make :
drush pm:enable migrate_tools
after uninstall path redirect import- 🇦🇺Australia pasan.gamage
I'm having this issue updating from D9 to the latest D10 and do drush updb.
I tried clean installs, composer cache clear and removing vendor and other dirs installed via composer. But no luck.Drupal 10.2.4
Drush 12.4
path_redirect_import 2.0.9I don't use migrate_tools module in the project but I tried just adding it (6.0.4) via composer but the MigrateToolsCommands not found error exists.
Error: Class "Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands" not found in /var/www/html/web/modules/contrib/path_redirect_import/src/Drush/Commands/PathRedirectImportCommands.php on line 30 #0 /var/www/html/vendor/composer/ClassLoader.php(576): include()
- Status changed to Needs work
9 months ago 11:34am 7 March 2024 - 🇯🇴Jordan n.ghunaim Amman - Jordan
I'm facing the same error as @pasan.gamage
Drupal 10.2.4
Drush 12.4.3
path_redirect_import 2.0.9
migrate_tools 6.0.4no patches applied, and still facing this error each time I run drush:
[error] Error: Class "Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands" not found in include() (line 30 of /app/docroot/modules/contrib/path_redirect_import/src/Drush/Commands/PathRedirectImportCommands.php) #0 /app/vendor/composer/ClassLoader.php(576): include()
- Status changed to RTBC
9 months ago 11:57am 7 March 2024 - 🇯🇴Jordan n.ghunaim Amman - Jordan
Sorry, it's my mistake, the "migrate" and "migrat_tools" modules was not enabled.
- 🇷🇺Russia ilya.no
I have this error, when site on D9 doesn't have migrate modules enabled, so when I update to D10 and this module to the latest version, then there is fatal error on evert drush command right after composer update.
In order to fix it from drush side, I've added this issue https://github.com/drush-ops/drush/issues/5860 and related PR, which can be used as a patch for composer https://patch-diff.githubusercontent.com/raw/drush-ops/drush/pull/5861.diff
- 🇮🇳India manishdrupaldev
Hi,
I have disabled the module "path redirect import" and then again enable the module.
Issue has been fixed.
Drupal- 10.2.4
path redirect import- 2.0.9Thanks!
- last update
7 months ago 3 pass - 🇻🇳Vietnam linhnm
Reroll for:
Drupal 10.2.5
migrate_tools: 6.0.2
path_redirect_import: 2.0.9 - 🇮🇳India adwivedi008
I am facing the same issue and patch #50 doesn't seem to resolve the issue for D-10.2.6
any suggestions - 🇷🇺Russia ilya.no
As I stated in my previous comment #48 🐛 "Drupal\migrate_tools\Commands\MigrateToolsCommands" not found PathRedirectImportCommands Postponed: needs info I've created issue for Drush, because I haven't found solution from the Drupal side. Corresponding changes are merged in 13.x branch of Drush, so I'm not sure, when it will be available. But if this patch applies to your version of Drush, you can use it. My patch allows drush commands to be executed without fatal error and it allows deploy to be run fine.
- Status changed to Needs work
5 months ago 9:36am 5 July 2024 Facing an issue with the latest version of migrate_tools (6.0.4 on 5 July 2024).
https://git.drupalcode.org/project/migrate_tools/-/blame/6.0.4/src/Drush...
Guess, we should change the use to match the namespace of the current latest version in migrate_tools.Also, the latest version of the module expects the 6.0.4 version of migrate_tools.
https://git.drupalcode.org/project/path_redirect_import/-/blob/2.0.x/pat...Should be
use Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands;
instead ofuse Drupal\migrate_tools\Drush\MigrateToolsCommands;
- Status changed to RTBC
5 months ago 9:46am 5 July 2024 - Status changed to Needs review
3 days ago 2:50am 19 November 2024 - 🇮🇳India binnythomas Trivandrum, Kerala, India
I am facing this issue with version 2.0.9 on Drupal 9.5.11 preventing me from upgrading to Drupal 10.5. The given patches do not seem to work