Simple global filter: Uncaught PHP Exception TypeError

Created on 3 September 2023, over 1 year ago
Updated 16 October 2023, about 1 year ago

Problem/Motivation

Right after enabling simple global filter:

The website encountered an unexpected error. Please try again later.

TypeError: Drupal\simple_global_filter\EventSubscriber\InitSubscriber::setFilterIfInURL(): Argument #1 ($event) must be of type Drupal\Component\EventDispatcher\Event, Symfony\Component\HttpKernel\Event\RequestEvent given in Drupal\simple_global_filter\EventSubscriber\InitSubscriber->setFilterIfInURL() (line 30 of modules/contrib/simple_global_filter/src/EventSubscriber/InitSubscriber.php).

call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
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)

Apache error.log:
Uncaught PHP Exception TypeError: "Drupal\\simple_global_filter\\EventSubscriber\\InitSubscriber::setFilterIfInURL(): Argument #1 ($event) must be of type Drupal\\Component\\EventDispatcher\\Event, Symfony\\Component\\HttpKernel\\Event\\RequestEvent given" at /.../modules/contrib/simple_global_filter/src/EventSubscriber/InitSubscriber.php line 30

Happens on any page. So the site is dead.
D10.1.2
php 8.1

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

๐Ÿ‡ฆ๐Ÿ‡นAustria maxilein

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

Comments & Activities

Production build 0.71.5 2024