Installing failed on 10.1

Created on 30 July 2023, over 1 year ago
Updated 7 September 2023, about 1 year ago

Problem/Motivation

When I used composer to install metatag 2.0, the site crashed and I started getting this error:

The website encountered an unexpected error. Please try again later.
Error: Class "Drupal\metatag\Normalizer\MetatagHalNormalizer" not found in Drupal\Component\DependencyInjection\Container->createService() (line 259 of core/lib/Drupal/Component/DependencyInjection/Container.php).
Drupal\Component\DependencyInjection\Container->createService() (Line: 455)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() (Line: 468)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() (Line: 237)
Drupal\Component\DependencyInjection\Container->createService() (Line: 177)
Drupal\Component\DependencyInjection\Container->get() (Line: 440)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() (Line: 273)
Drupal\Component\DependencyInjection\Container->createService() (Line: 177)
Drupal\Component\DependencyInjection\Container->get() (Line: 440)
Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() (Line: 237)
Drupal\Component\DependencyInjection\Container->createService() (Line: 177)
Drupal\Component\DependencyInjection\Container->get() (Line: 105)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 224)
Symfony\Component\HttpKernel\HttpKernel->handleThrowable() (Line: 89)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Perhaps something is misconfigured with the composer requirements?

πŸ› Bug report
Status

Closed: cannot reproduce

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bogdog400

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

Comments & Activities

  • Issue created by @bogdog400
  • πŸ‡ΊπŸ‡ΈUnited States bogdog400

    BTW, this could be somehow connected to a symfony upgrade (6.3.1 -> 6.3.2) that I triggered at the same time when executing "composer upgrade".

    Here's the error that appears after I remove the metatag module from modules/contrib

    The website encountered an unexpected error. Please try again later.
    Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "serializer", path: "jsonapi.resource_response.subscriber -> jsonapi.serializer -> serializer -> serialization.exception.default". in Drupal\Component\DependencyInjection\Container->get() (line 147 of core/lib/Drupal/Component/DependencyInjection/Container.php).
    Drupal\Component\DependencyInjection\Container->get() (Line: 440)
    Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() (Line: 237)
    Drupal\Component\DependencyInjection\Container->createService() (Line: 177)
    Drupal\Component\DependencyInjection\Container->get() (Line: 105)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 224)
    Symfony\Component\HttpKernel\HttpKernel->handleThrowable() (Line: 89)
    Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
    Drupal\Core\DrupalKernel->handle() (Line: 19)
    
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Did you have 8.x-1.26 (or older) installed before upgrading to v2? The MetatagHalNormalizer class was removed in v2. Did you rebuild the site's caches and run the update scripts after upgrading? There were some notes about this in the release notes: https://www.drupal.org/project/metatag/releases/2.0.0 β†’

  • πŸ‡ΊπŸ‡ΈUnited States bogdog400

    Thanks for this note. This is a very helpful pointer!

    I don't recall having installed it before. I certainly don't remember using it.

    But I do recall a note flying by during the composer require run. It said something about 1.26. I will try to recreate this with a backup.

  • πŸ‡ΊπŸ‡ΈUnited States bogdog400

    I went through several iterations with changing the ordering of the software updates. The pointer from #3 helped quite a bit. (Thx.)

    If I went through the metatag update first and made sure to clear the cache, it was fine.

    If I updated php 8.1.6 to avoid an opcache error and then upgraded metatag, the problem appeared. After noodling around, I think the problem is that the upgrade to 8.1.6 also ended up installing 8.2.8 but I didn't have php8.2-sqlite installed in the system. So then drush started failing because it looked for the sqlite database drivers but it couldn't find them.

    sudo apt-get install php8.2-sqlite
    

    I'm going to close this now because it looks like it's only tangentially connected to metatag.

    Thanks for your patience and pointers. They were very helpful.

  • Status changed to Closed: cannot reproduce about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States allella

    #5 said

    I'm going to close this now because it looks like it's only tangentially connected to metatag.

    but the issue is still open.

    Closing

Production build 0.71.5 2024