PHP Fatal Error Argument 4 passed to Drupal\minifyjs\MinifyJs (line 58)

Created on 20 October 2021, about 3 years ago
Updated 18 April 2023, over 1 year ago

Problem/Motivation

Can't Reach Performance Page Or Minify Admin Pages

Error:
The website encountered an unexpected error. Please try again later.
TypeError: Argument 4 passed to Drupal\minifyjs\MinifyJs::__construct() must be an instance of Drupal\Core\File\FileSystem, instance of Drupal\s3fs\S3fsFileService given, called in /www/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 in Drupal\minifyjs\MinifyJs->__construct() (line 58 of modules/contrib/minifyjs/src/MinifyJs.php).

Steps to reproduce

Went to either of these pages.
/admin/config/development/performance
/admin/config/development/performance/js

I am using S3FS Amazon Module.

Proposed resolution

I was able to resolve this by using FileSystemInterface instead of FileSystem in line 58 of /src/MinifyJs.php

Similar to this patch: https://www.drupal.org/files/issues/2021-03-10/fix-issue-with-advagg-and... β†’

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States EminentD

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.

Production build 0.71.5 2024