RouteProcessor argument count exception

Created on 6 September 2022, about 2 years ago
Updated 21 June 2024, 5 months ago

Problem/Motivation

ArgumentCountError: Too few arguments to function Drupal\migrate_tools\Routing\RouteProcessor::__construct(), 0 passed

Steps to reproduce

Install migrate_tools module and attempt to clear cache or import config

🐛 Bug report
Status

Needs work

Version

6.0

Component

Code

Created by

🇺🇸United States jiong_ye

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States JI_Gravityworks

    I'm also seeing this issue with the newest/dev version of 6.0. Is there a fix for it?

  • I had this error after updating to 6.0.1.

    After running drush cr the error is gone.

  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work over 1 year ago
  • 🇬🇧United Kingdom kenorb

    Patch works fine.

  • 🇬🇧United Kingdom fonant

    Patch #5 applies but doesn't make any difference to me, this error appearing when upgrading from migrate_tools 8.x-5.x to 6.x

  • 🇪🇸Spain oriol_e9g Barcelona

    Same problem with PHP 7.4 and the patch fixes the bug. Remember to clear the cache after applying the patch.

  • 🇪🇸Spain oriol_e9g Barcelona

    The problem is that sometimes the entityTypeManager is not injected to the constructor, a temporal workaround can be inject directly from the container if this is not injected.

  • 🇬🇧United Kingdom rossb89 Bristol

    There shouldn't be a reason why @entity_type.manager isn't injected.

    Rebuilding the cache with `drush cr` should solve this.

    Saying that, I just had a wild goose chase on a local multisite environment which was having this issue... It turns out I had a misconfiguration in sites.php referencing old port numbers in the aliases that weren't in use... so the site that I was rebuilding the caches for in drush wasn't actually the site that I I was hitting accessing the site via the URL....

    Once I resolved that, this was a non issue after rebuilding the caches.

    The patch in #5 although improving documentation around the __constructand changing member visibility from private to protected, doesn't actually do anything to solve this issue.

    The patch in #11 is a bit of a hack but if someone is encountering this issue even after rebuilding caches and can't get it working should potentially solve it...

Production build 0.71.5 2024