Core\Asset\CssCollectionRenderer::__construct(), 1 passed in amp/src/Asset/AmpCssCollectionRenderer | ::onView(): Argument #1 | undefined function drupal_get_path

Created on 13 April 2023, over 1 year ago

There are following 3x Issues at current AMP Version:

1. Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "asset.css.collection_renderer", path: "ajax_response.subscriber
ArgumentCountError: Too few arguments to function Drupal\Core\Asset\CssCollectionRenderer::__construct(), 1 passed in /modules/contrib/amp/src/Asset/AmpCssCollectionRenderer

2. TypeError: Drupal\amp\EventSubscriber\AmpEventSubscriber::onView(): Argument #1 ($event) must be of type Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent

3. Error: Call to undefined function drupal_get_path() in amp_theme_registry_alter() (line 327 of docroot/modules/contrib/amp/amp.module).

Provided Patch solves all of these 3x Issues. The Patch should be compatible with current dev version.

Please integrate it into the latest version

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇩🇪Germany flefle

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

Comments & Activities

  • Issue created by @flefle
  • 🇩🇪Germany flefle

    Patch solving the 3x Issues.

  • 🇩🇪Germany flefle

    This patch focuses only at:
    Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "asset.css.collection_renderer", path: "ajax_response.subscriber
    ArgumentCountError: Too few arguments to function Drupal\Core\Asset\CssCollectionRenderer::__construct(), 1 passed in /modules/contrib/amp/src/Asset/AmpCssCollectionRenderer

Production build 0.71.5 2024