0
[Sat Sep 04 15:52:46.939952 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:49930] mod_fcgid: stderr: #21 C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\index.php(19): Drupal\\Core\\DrupalKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))
[Sat Sep 04 15:52:46.939952 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:49930] mod_fcgid: stderr: #22 {main}
[Sat Sep 04 15:54:08.049773 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:50615] mod_fcgid: stderr: ArgumentCountError: Too few arguments to function Drupal\\hello_world\\Logger\\MailLogger::__construct(), 0 passed in C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\core\\lib\\Drupal\\Component\\DependencyInjection\\Container.php on line 257 and exactly 2 expected in C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\modules\\custom\\hello_world\\src\\Logger\\MailLogger.php on line 41 #0 C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\core\\lib\\Drupal\\Component\\DependencyInjection\\Container.php(257): Drupal\\hello_world\\Logger\\MailLogger->__construct()
[Sat Sep 04 15:54:08.049773 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:50615] mod_fcgid: stderr: #1 C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\core\\lib\\Drupal\\Component\\DependencyInjection\\Container.php(171): Drupal\\Component\\DependencyInjection\\Container->createService(Array, 'hello_world.log...')
[Sat Sep 04 15:54:08.049773 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:50615] mod_fcgid: stderr: #2 C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\core\\lib\\Drupal\\Component\\DependencyInjection\\Container.php(432): Drupal\\Component\\DependencyInjection\\Container->get('hello_world.log...', 1)
[Sat Sep 04 15:54:08.049773 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:50615] mod_fcgid: stderr: #3 C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\core\\lib\\Drupal\\Component\\DependencyInjection\\Container.php(271): Drupal\\Component\\DependencyInjection\\Container->resolveServicesAndParameters(Array)
[Sat Sep 04 15:54:08.049773 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:50615] mod_fcgid: stderr: #4 C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\core\\lib\\Drupal\\Component\\DependencyInjection\\Container.php(171): Drupal\\Component\\DependencyInjection\\Container->createService(Array, 'logger.factory')
[Sat Sep 04 15:54:08.049773 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:50615] mod_fcgid: stderr: #5 C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\core\\lib\\Drupal\\Component\\DependencyInjection\\Container.php(432): Drupal\\Component\\DependencyInjection\\Container->get('logger.factory', 1)
[Sat Sep 04 15:54:08.049773 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:50615] mod_fcgid: stderr: #6 C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\core\\lib\\Drupal\\Component\\DependencyInjection\\Container.php(247): Drupal\\Component\\DependencyInjection\\Container->resolveServicesAndParameters(Array)
[Sat Sep 04 15:54:08.049773 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:50615] mod_fcgid: stderr: #7 C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\core\\lib\\Drupal\\Component\\DependencyInjection\\Container.php(171): Drupal\\Component\\DependencyInjection\\Container->createService(Array, 'logger.channel....')
[Sat Sep 04 15:54:08.049773 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:50615] mod_fcgid: stderr: #8 C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\core\\lib\\Drupal\\Component\\DependencyInjection\\Container.php(432): Drupal\\Component\\DependencyInjection\\Container->get('logger.channel....', 1)
[Sat Sep 04 15:54:08.049773 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:50615] mod_fcgid: stderr: #9 C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\core\\lib\\Drupal\\Component\\DependencyInjection\\Container.php(235): Drupal\\Component\\DependencyInjection\\Container->resolveServicesAndParameters(Array)
[Sat Sep 04 15:54:08.049773 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:50615] mod_fcgid: stderr: #10 C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\core\\lib\\Drupal\\Component\\DependencyInjection\\Container.php(171): Drupal\\Component\\DependencyInjection\\Container->createService(Array, 'form_validator')
[Sat Sep 04 15:54:08.049773 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:50615] mod_fcgid: stderr: #11 C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\core\\lib\\Drupal\\Component\\DependencyInjection\\Container.php(432): Drupal\\Component\\DependencyInjection\\Container->get('form_validator', 1)
[Sat Sep 04 15:54:08.049773 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:50615] mod_fcgid: stderr: #12 C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\core\\lib\\Drupal\\Component\\DependencyInjection\\Container.php(235): Drupal\\Component\\DependencyInjection\\Container->resolveServicesAndParameters(Array)
[Sat Sep 04 15:54:08.049773 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:50615] mod_fcgid: stderr: #13 C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\core\\lib\\Drupal\\Component\\DependencyInjection\\Container.php(171): Drupal\\Component\\DependencyInjection\\Container->createService(Array, 'form_builder')
[Sat Sep 04 15:54:08.049773 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:50615] mod_fcgid: stderr: #14 C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\core\\lib\\Drupal.php(599): Drupal\\Component\\DependencyInjection\\Container->get('form_builder')
[Sat Sep 04 15:54:08.049773 2021] [fcgid:warn] [pid 8276:tid 4] [client 127.0.0.1:50615] mod_fcgid: stderr: #15 C:\\Users\\jeanp\\Sites\\devdesktop\\drupal-9-project-9.0.3\\core\\modules\\views\\src\\Plugin\\views\\exposed_form\\ExposedFormPluginBase.php(134): Drupal::formBuilder()
  • The class MailLogger has two parameters that are fed in the module's services.yml file:
hello_world.logger.mail_logger:
    class: Drupal\hello_world\Logger\MailLogger
    arguments: ['@logger.log_message_parser', '@config.factory']
    tags:
      - { name: logger }
  • I don't understand why the 2 parameters of MailLogger are considered missing ?
2
  • You didn't show us the code where you are calling the controller.
    – Jaypan
    Sep 4 at 21:16
  • 2
    I’m voting to close this question because it's a bug report to a third-party project hosted on drupal.org or elsewhere. Please file a bug report there, not here on Drupal Answers. Many thanks
    – leymannx
    Sep 5 at 5:25
1
  1. Your first point of contact should be the author of that code, who got paid to write that code. That is the person who should be providing the support.
  2. Search the internet. If that code is faulty, then there will certainly be a bug report somewhere that reports the same error as you. If you can't find a similar report, chances are the problem is on your end and not with the code.
  3. That code seems to be written for Drupal 9.0. That is not the current version of Drupal. If you are using as more current version of Drupal, it's entirely possible that changes to Drupal have caused that code to stop working. Use the version of Drupal that the code was designed for and see if it works there. If it does, then the code needs to be updated.
  4. If you have changed the code in any way, like changing the name of the module, then again chances are you've done something wrong. Don't make any changes at all, no matter how trivial, until after you get the code running.

Not the answer you're looking for? Browse other questions tagged or ask your own question.