Module can cause WSOD errors

Created on 18 August 2022, over 2 years ago
Updated 25 April 2023, over 1 year ago

Problem/Motivation

In several different settings entities that use the zip file field cause WSOD errors.

PHP Fatal error:  Declaration of 
Drupal\\field_zip_file\\Plugin\\Field\\FieldFormatter\\ZipFileBase::create(Symfony\\Component\\DependencyInjection\\ContainerInterface $container) 
must be compatible with Drupal\\Core\\Field\\FormatterBase::create(Symfony\\Component\\DependencyInjection\\ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) in 
/opt/drupal/web/modules/contrib/field_zip_file/src/Plugin/Field/FieldFormatter/ZipFileBase.php on line 45

Steps to reproduce

  1. Install module, media module
  2. Add media type
  3. Add zip field to media type
  4. Add media to content type
  5. Add content with media and upload a zip file
  6. Visit content view page

I've also seen the same error when trying to visit Reports > Recent log messages.

Proposed resolution

Make ZipFileBase::create compatible with FormatterBase::create

Remaining tasks

Create PR

User interface changes

nil

API changes

nil

Data model changes

nil

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇦🇺Australia queenvictoria

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