Problem/Motivation

After upgrade to 3.0, I can't access to any media or /admin/content/media.
Error:

Call to a member function getDefaultLanguage() on null in Drupal\flysystem_s3\Flysystem\S3->getDownloadUrl() (line 33 of modules/contrib/flysystem/src/Plugin/FlysystemUrlTrait.php).

The Plugin S3.php does not define the languageManager property, so the trait FlysystemUrlTrait is not able to execute:

public function getExternalUrl($uri) {
   ......
    $language = $this->languageManager->getDefaultLanguage();
    return Url::fromRoute('flysystem.serve', $arguments, ['absolute' => TRUE, 'language' => $language])->toString();
  }

Proposed resolution

Include property in the plugin S3.php

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dioni created an issue. See original summary.

dioni’s picture

Version: 3.0.0 » 3.0.x-dev

dioni’s picture

Status: Active » Needs review
dioni’s picture

Assigned: dioni » Unassigned
dioni’s picture

Status: Needs review » Reviewed & tested by the community

Tested with the current site I am working