Updating metatag using drupal crashed the site, what happened that would have caused this? This is not the first time updating metatag crashed my site, are there specific steps one should take to prevent this when updating metatag?

The website encountered an unexpected error. Please try again later.
TypeError: Argument 5 passed to Drupal\metatag\MetatagManager::__construct() must be an instance of Drupal\Core\Entity\EntityTypeManager, none given, called in /home/user/public_html/core/lib/Drupal/Component/DependencyInjection/Container.php on line 280 in Drupal\metatag\MetatagManager->__construct() (line 42 of modules/metatag/src/MetatagManager.php).

Comments

sushichris created an issue. See original summary.

sushichris’s picture

Error Log

[01-Jun-2017 15:36:33 UTC] TypeError: Argument 5 passed to Drupal\metatag\MetatagManager::__construct() must be an instance of Drupal\Core\Entity\EntityTypeManager, none given, called in /home/user/public_html/core/lib/Drupal/Component/DependencyInjection/Container.php on line 280 in /home/user/public_html/modules/metatag/src/MetatagManager.php on line 42 #0 /home/user/public_html/core/lib/Drupal/Component/DependencyInjection/Container.php(280): Drupal\metatag\MetatagManager->__construct(Object(Drupal\metatag\MetatagGroupPluginManager), Object(Drupal\metatag\MetatagTagPluginManager), Object(Drupal\metatag\MetatagToken), Object(Drupal\Core\Logger\LoggerChannelFactory))
#1 /home/user/public_html/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'metatag.manager')
#2 /home/user/public_html/core/lib/Drupal.php(158): Drupal\Component\DependencyInjection\Container->get('metatag.manager')
#3 /home/user/public_html/modules/metatag/metatag.module(333): Drupal::service('metatag.manager')
#4 /home/user/public_html/modules/metatag/metatag.module(299): metatag_get_tags_from_route()
#5 /home/user/public_html/core/lib/Drupal/Core/Theme/ThemeManager.php(287): metatag_preprocess_html(Array, 'html', Array)
#6 /home/user/public_html/core/lib/Drupal/Core/Render/Renderer.php(435): Drupal\Core\Theme\ThemeManager->render('html', Array)
#7 /home/user/public_html/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, true)
#8 /home/user/public_html/core/lib/Drupal/Core/Render/Renderer.php(139): Drupal\Core\Render\Renderer->render(Array, true)
#9 /home/user/public_html/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}()
#10 /home/user/public_html/core/lib/Drupal/Core/Render/Renderer.php(140): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#11 /home/user/public_html/core/lib/Drupal/Core/Render/BareHtmlPageRenderer.php(66): Drupal\Core\Render\Renderer->renderRoot(Array)
#12 /home/user/public_html/core/lib/Drupal/Core/ProxyClass/Render/BareHtmlPageRenderer.php(76): Drupal\Core\Render\BareHtmlPageRenderer->renderBarePage(Array, Object(Drupal\Core\StringTranslation\TranslatableMarkup), 'maintenance_pag...', Array)
#13 /home/user/public_html/core/authorize.php(193): Drupal\Core\ProxyClass\Render\BareHtmlPageRenderer->renderBarePage(Array, Object(Drupal\Core\StringTranslation\TranslatableMarkup), 'maintenance_pag...', Array)
#14 {main}

John Graffio’s picture

I got exactly the same error, luckily I did this in a test environment.

After getting a WSOD, I cleared all caches (drush cr all), then the test site came back online. I don't know what really happened so I'm not going to install this update in production yet.

foley’s picture

Same thing happened to me, except drush cr didn't do the trick.

kferencz91’s picture

Got the same thing in a test environment running on 8.3.0. Ran update.php and the site appeared to come back up ok.

Mytko Enko’s picture

Same happened to me when I did "update" via UI. But when I did it manually - deleted the folder from modules and than extracted new version - after cache rebuild everything is updated and previous settings are working. But another problem occures - when I try to add a new "View meta tag" process crashes after pressing submit button. It doesn't affect on site, but the "view meta tag" is not created and not working.

Reproduce method:

1.
Installing new drupal 8.3.2 site
installing token and metatags - works fine.
Adding new view, attempt to add meta tags to view - process crashes

2.
Manual update of metatag module on development site
enabling views meta tags - everything works as should.
Trying to add view meta tag - process crashes.

The log message in both situations is:
InvalidArgumentException: The configuration property display.page_1.display_options.display_extenders.metatag_display_extender.metatags.robots.index doesn't exist. in Drupal\Core\Config\Schema\ArrayElement->get() (line 74 of C:\web\xampp\htdocs\mtk-dev\core\lib\Drupal\Core\Config\Schema\ArrayElement.php).

onejam’s picture

Just tried to update and having the same issue:

The website encountered an unexpected error. Please try again later.
TypeError: Argument 5 passed to Drupal\metatag\MetatagManager::__construct() must be an instance of Drupal\Core\Entity\EntityTypeManager, none given, called in /core/lib/Drupal/Component/DependencyInjection/Container.php on line 280 in Drupal\metatag\MetatagManager->__construct() (line 42 of modules/metatag/src/MetatagManager.php).

This is on Drupal 8.3.2 and using PHP 7

damienmckenna’s picture

Did you try running /core/rebuild.php?

JonathanFontesCaetsu’s picture

Hi,

I have the same issue, and didn't work run core/rebuild.php. I'm also run, drush cr and nothing. You do have any sugestion?

Best Regards,
Jonathan Fontes
CAETSU

damienmckenna’s picture

Status: Active » Closed (duplicate)