- π©πͺGermany thomaswalther Rhein-Main Area
Version dev worked for me. But not the 1.22 also with cleared cached before update.
I had installed version 1.19 (D9.3.3 with php7.4) and update to 1.22 (D9.5.5 with php 8.1.14)
This is my error. Maybe it will help you as info:
ArgumentCountError: Too few arguments to function Drupal\metatag\MetatagManager::__construct(), 5 passed in /webroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 and exactly 9 expected in /webroot/modules/metatag/src/MetatagManager.php on line 119 #0 /webroot/core/lib/Drupal/Component/DependencyInjection/Container.php(259): Drupal\metatag\MetatagManager->__construct() #1 /webroot/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService() #2 /webroot/core/lib/Drupal.php(197): Drupal\Component\DependencyInjection\Container->get() #3 /webroot/modules/metatag/metatag.module(483): Drupal::service() #4 /webroot/modules/metatag/metatag.module(451): metatag_get_tags_from_route() #5 [internal function]: metatag_preprocess_html() #6 /webroot/core/lib/Drupal/Core/Theme/ThemeManager.php(287): call_user_func_array() #7 /webroot/core/lib/Drupal/Core/Render/Renderer.php(433): Drupal\Core\Theme\ThemeManager->render() #8 /webroot/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender() #9 /webroot/core/lib/Drupal/Core/Render/Renderer.php(148): Drupal\Core\Render\Renderer->render() #10 /webroot/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}() #11 /webroot/core/lib/Drupal/Core/Render/Renderer.php(149): Drupal\Core\Render\Renderer->executeInRenderContext() #12 /webroot/core/lib/Drupal/Core/Render/BareHtmlPageRenderer.php(66): Drupal\Core\Render\Renderer->renderRoot() #13 /webroot/core/lib/Drupal/Core/ProxyClass/Render/BareHtmlPageRenderer.php(76): Drupal\Core\Render\BareHtmlPageRenderer->renderBarePage() #14 /webroot/core/authorize.php(197): Drupal\Core\ProxyClass\Render\BareHtmlPageRenderer->renderBarePage() #15 {main}
- Status changed to Closed: duplicate
over 1 year ago 12:45pm 20 March 2023 - πΊπΈUnited States DamienMcKenna NH, USA
If the problem doesn't happen in the dev version then this seems to be a problem that was fixed by another issue.
- Status changed to Active
about 1 year ago 6:15pm 12 October 2023 - π·πΈSerbia milovan
Hello,
Drupal 9.5.11
Metatag 2.0.0
PHP 8.1.18ArgumentCountError: Too few arguments to function Drupal\metatag\MetatagManager::__construct(), 9 passed in /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 and exactly 10 expected in Drupal\metatag\MetatagManager->__construct() (line 131 of /var/www/html/docroot/modules/contrib/metatag/src/MetatagManager.php)
The same issue appeared on Prod on Acquia Cloud env. An additional flush cache made it go away.
I will test it with PHP 8.2 as well.I can't find a duplicate issue for this ticket, so I am reopening it. In case I missed the duplicated issue, please let me know and I apologise in advance.
- π¨π¦Canada Liam Morland Ontario, CA π¨π¦
PHP version tags show the first version with the problem. Bugs are always against a development branch.
- Status changed to Postponed: needs info
about 1 year ago 6:21pm 19 October 2023 - πΊπΈUnited States DamienMcKenna NH, USA
I'm petty certain this problem stems from the previous version of the service definition being cached somewhere, and the codebase change confused it. I recommend reloading the caches and, if necessary, restart the web server or PHP service as applicable, that should resolve it.
If a bug can be identified beyond this service caching problem, please let me know, but for now I'm going to leave this as postponed until something more solid is provided.
- π©πͺGermany marcoka
I updated to mettag 2 and the matching schema org module using the composer command that was referenced in the update log.
Site is complete broken now.- drush cr has been done
- complete restart of http server
- complete system reboot
- drush updb has been run
What caches could be cleaned else?
I have xdebug running. If i get some hints i can provide more information.Mon Nov 20 14:29:40.710693 2023] [php:notice] [pid 6912] [client 127.0.0.1:59434] Uncaught PHP Exception ArgumentCountError: "Too few arguments to function Drupal\\metatag\\MetatagManager::__construct(), 9 passed in /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D12/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 and exactly 10 expected" at /srv/http/WORKSPACE_DRUPAL/EIGENE_PROJEKTE/PRODUCT_DISTRI_D12/web/modules/contrib/metatag/src/MetatagManager.php line 131
- Status changed to Active
12 months ago 1:27pm 6 December 2023 - π©πͺGermany thomaswalther Rhein-Main Area
Update via Backend with Drupal 9.3.9 from Metatag 8.x-1.19 to 8.x-1.26 I got this error:
ArgumentCountError: Too few arguments to function Drupal\metatag\MetatagManager::__construct(), 5 passed in /web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 and exactly 9 expected in Drupal\metatag\MetatagManager->__construct() (Zeile 119 in /web/modules/metatag/metatag/src/MetatagManager.php) #0 /web/core/lib/Drupal/Component/DependencyInjection/Container.php(262): Drupal\metatag\MetatagManager->__construct(
- π©πͺGermany Anybody Porta Westfalica
@thomaswalther try clearing caches, might help!
- Status changed to Postponed: needs info
12 months ago 2:21pm 6 December 2023 - π¦π·Argentina gerzenstl Resistencia
I'm getting this error and it happens randomly.
I can solve it by flushing the cache, but then after a couple of hours it happens again.
My site is using:
Drupal 9.5.11
metatag 2.0.0PHP 8.1.27