conflict with redirect_404 module

Created on 14 January 2022, almost 3 years ago
Updated 11 June 2023, over 1 year ago

Problem/Motivation

Fresh install
Required the module,
configured the strava settings and now:

"PHP message: TypeError: Drupal\strava\Controller\StravaController::__construct(): Argument #2 ($logger_factory) must be of type Drupal\Core\Logger\LoggerChannelFactory, Drupal\redirect_404\Render\Redirect404LogSuppressor given, called in /var/www/html/web/modules/contrib/strava/src/Controller/StravaController.php on line 52

It seems there's a conflict with the Redirect 404 module

If I alter the constructor like so:

public function __construct(RequestStack $request_stack, Redirect404LogSuppressor $logger_factory) {

I get it working (linking to strava and all.
I was not sure if setting the module weight had any impact on this so I tried it with both high an low weight for the Strava and redirect 404 module.

module_set_weight('strava', 1000)

To no avail.

Steps to reproduce

install redirect_404
install strava

🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇧🇪Belgium wouters_f Leuven

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇱Netherlands basvredeling Amsterdam

    The StravaController uses the LoggerChannelFactoryInterface nowadays so it will work with any implementation of that interface. And as far as I can tell current versions of the Redirect404LogSuppressor class implement the interface.

Production build 0.71.5 2024