- π¨π¦Canada earthangelconsulting
this is not working for me, i am getting the same error as the original poster.
i am trying to run version 8.x-1.9 of this module, on Drupal 9.5.0, php 7.4.33, Drush 8.4.6
(8.x-1.x-dev is identical to 8.x-1.9 at this time)here's the stack trace:
>drush dmu-upgrade registration_type Indexing...done. Use of undefined constant MENU_DEFAULT_LOCAL_TASK - assumed [warning] 'MENU_DEFAULT_LOCAL_TASK' (this will throw an Error in a future version of PHP) HookMenu.php(73) : eval()'d code:14 Use of undefined constant MENU_LOCAL_ACTION - assumed [warning] 'MENU_LOCAL_ACTION' (this will throw an Error in a future version of PHP) HookMenu.php(73) : eval()'d code:22 Use of undefined constant MENU_DEFAULT_LOCAL_TASK - assumed [warning] 'MENU_DEFAULT_LOCAL_TASK' (this will throw an Error in a future version of PHP) HookMenu.php(73) : eval()'d code:14 Use of undefined constant MENU_LOCAL_ACTION - assumed [warning] 'MENU_LOCAL_ACTION' (this will throw an Error in a future version of PHP) HookMenu.php(73) : eval()'d code:22 TypeError: Argument 2 passed to [error] Drupal\drupalmoduleupgrader\Routing\LinkBinding\LinkBindingFactory::create() must be an instance of Drupal\drupalmoduleupgrader\Routing\Drupal8\RouteWrapper, null given, called in /home/foobar/public_html/ea.foobar.com/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Converter/Links.php on line 90 in Drupal\drupalmoduleupgrader\Routing\LinkBinding\LinkBindingFactory->create() (line 34 of /home/foobar/public_html/ea.foobar.com/web/modules/contrib/drupalmoduleupgrader/src/Routing/LinkBinding/LinkBindingFactory.php) #0 /home/foobar/public_html/ea.foobar.com/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Converter/Links.php(90): Drupal\drupalmoduleupgrader\Routing\LinkBinding\LinkBindingFactory->create(Object(Drupal\drupalmoduleupgrader\Routing\Drupal7\RouteWrapper), NULL) #1 /home/foobar/public_html/ea.foobar.com/web/modules/contrib/drupalmoduleupgrader/drupalmoduleupgrader.drush.inc(352): Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\Links->convert(Object(Drupal\drupalmoduleupgrader\Target)) #2 phar:///usr/local/bin/drush/includes/command.inc(422): drush_drupalmoduleupgrader_dmu_upgrade('registration_ty...') #3 phar:///usr/local/bin/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array) #4 phar:///usr/local/bin/drush/includes/command.inc(199): drush_command('registration_ty...') #5 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array) #6 phar:///usr/local/bin/drush/includes/preflight.inc(67): Drush\Boot\BaseBoot->bootstrap_and_dispatch() #7 phar:///usr/local/bin/drush/includes/startup.inc(465): drush_main() #8 phar:///usr/local/bin/drush/includes/startup.inc(369): drush_run_main(false, '/', 'Phar detected. ...') #9 phar:///usr/local/bin/drush/drush(114): drush_startup(Array) #10 /usr/local/bin/drush(10): require('phar:///usr/loc...') #11 {main}. TypeError: Argument 2 passed to Drupal\drupalmoduleupgrader\Routing\LinkBinding\LinkBindingFactory::create() must be an instance of Drupal\drupalmoduleupgrader\Routing\Drupal8\RouteWrapper, null given, called in /home/foobar/public_html/ea.foobar.com/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Converter/Links.php on line 90 in /home/foobar/public_html/ea.foobar.com/web/modules/contrib/drupalmoduleupgrader/src/Routing/LinkBinding/LinkBindingFactory.php on line 34 #0 /home/foobar/public_html/ea.foobar.com/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Converter/Links.php(90): Drupal\drupalmoduleupgrader\Routing\LinkBinding\LinkBindingFactory->create(Object(Drupal\drupalmoduleupgrader\Routing\Drupal7\RouteWrapper), NULL) #1 /home/foobar/public_html/ea.foobar.com/web/modules/contrib/drupalmoduleupgrader/drupalmoduleupgrader.drush.inc(352): Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\Links->convert(Object(Drupal\drupalmoduleupgrader\Target)) #2 phar:///usr/local/bin/drush/includes/command.inc(422): drush_drupalmoduleupgrader_dmu_upgrade('registration_ty...') #3 phar:///usr/local/bin/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array) #4 phar:///usr/local/bin/drush/includes/command.inc(199): drush_command('registration_ty...') #5 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array) #6 phar:///usr/local/bin/drush/includes/preflight.inc(67): Drush\Boot\BaseBoot->bootstrap_and_dispatch() #7 phar:///usr/local/bin/drush/includes/startup.inc(465): drush_main() #8 phar:///usr/local/bin/drush/includes/startup.inc(369): drush_run_main(false, '/', 'Phar detected. ...') #9 phar:///usr/local/bin/drush/drush(114): drush_startup(Array) #10 /usr/local/bin/drush(10): require('phar:///usr/loc...') #11 {main} TypeError: Argument 2 passed to Drupal\drupalmoduleupgrader\Routing\LinkBinding\LinkBindingFactory::create() must be an instance of Drupal\drupalmoduleupgrader\Routing\Drupal8\RouteWrapper, null given, called in /home/foobar/public_html/ea.foobar.com/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Converter/Links.php on line 90 in Drupal\drupalmoduleupgrader\Routing\LinkBinding\LinkBindingFactory->create() (line 34 of /home/foobar/public_html/ea.foobar.com/web/modules/contrib/drupalmoduleupgrader/src/Routing/LinkBinding/LinkBindingFactory.php). Drush command terminated abnormally due to an unrecoverable error. [error]
- ππΊHungary GΓ‘bor Hojtsy Hungary
The patch just kicks the can down the line, since the lower levels also require the route object. Why is not the route object there should be the question, so going up the chain instead of down would be better. This is where the link binding factory is called and looks like the getDestinationRoute does not return a valid route for the path?
$binding = $this->linkBinding->create($source, $hook_menu->getDestinationRoute($path));
This could be related to the undefined menu constants problem reported earlier, depending on how the code reacts to that.