Page MenuHomePhabricator

Upload images from VisualEditor fails when DataTransfer extension is installed
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • MW 1.39/1.43 installed as Docker image (VisualEditor extension is part of the installation)
  • DataTransfer extension is installed
  • Upload a new image in VisualEditor

What happens?:

The PHP Invalid response from the server error occurs:

[06-Feb-2025 09:33:40 Europe/Berlin] PHP Fatal error:  Declaration of Wikimedia\ParamValidator\Util\UploadedFile::getStream() must be compatible with Psr\Http\Message\UploadedFileInterface::getStream(): Psr\Http\Message\StreamInterface in /var/www/html/includes/libs/ParamValidator/Util/UploadedFile.php on line 86

What should have happened instead?:

The file should be uploaded without error. A similar issue has been reported before [1] and the solution was to add the missing psr/http-message 1.0.1 in
composer.json. But this is not the issue here, psr/http-message 1.1 is already there.

It seems in this case it is related to the DataTransfer extension, when this extension is removed, the error doesn't occur.

[1] https://www.mediawiki.org/wiki/Topic:Xjj6gknk25b9jeyr

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Either MW 1.39 & Data Transfer 1.4 or MW 1.43 & Data Transfer 1.6.1

Other information (browser name/version, screenshots, etc.):

Event Timeline

S0ring renamed this task from Upload images from VisualEditor fail with "Invalid response from the server." when DataTransfer extension is installed to Upload images from VisualEditor fails when DataTransfer extension is installed.Feb 7 2025, 11:18 AM

There's a similar issue involving psr/http-message when trying to edit a page that is protected for only administrators/sysops to edit.

Fatal error: Declaration of MWCallbackStream::write($string) must be compatible with Psr\Http\Message\StreamInterface::write(string $string): int in /includes/http/MWCallbackStream.php on line 50

This only occurs when the DataTransfer extension is enabled (on MediaWiki 1.43 and Data Transfer 1.6.1).

Yaron_Koren claimed this task.
Yaron_Koren subscribed.

I believe these issues were fixed with the change 427b6e95853b, a month ago - feel free to re-open if not.