Problem/Motivation

Hi!
When i add new media "streaming_video"... an unexpected error is displayed. Drupal version 9.3.12.
... /core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php on line 43 ...

CommentFileSizeAuthor
#9 unexpected-error_3276890_9.patch3.24 KBarturopanetta

Comments

ksandr created an issue. See original summary.

ksandr’s picture

Issue summary: View changes
ksandr’s picture

Issue summary: View changes
ksandr’s picture

Issue summary: View changes
arturopanetta’s picture

Hi ksandr,
I am trying to reproduce the error, without success. Can you tell me the steps to be able to reproduce it?

sundays’s picture

I'm having the same issue.
Brand new Drupal 9.4 install via composer with PHP 7.4.
I've only installed a couple of other modules such as Pathauto and Devel.
Followed instructions at https://www.drupal.org/project/streaming but I got this error when trying to add a media item => Streaming Video.

Notice: Undefined index: third_party_settings in Drupal\file\Plugin\Field\FieldWidget\FileWidget::create() (line 43 of /home/ppl/healthflix/web/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php)

And also:
TypeError: Argument 5 passed to Drupal\file\Plugin\Field\FieldWidget\FileWidget::__construct() must be of the type array, null given, called in /home/ppl/healthflix/web/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php on line 43 in Drupal\file\Plugin\Field\FieldWidget\FileWidget->__construct() (line 34 of /home/ppl/healthflix/web/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php)

I can provide the full call stack if that would help.

Thanks

arturopanetta’s picture

Priority: Normal » Critical

I can provide the full call stack if that would help.

Thanks @sundays, the information you have provided allows me to investigate the problem. As soon as I can I try to reproduce the error.

arturopanetta’s picture

Status: Active » Needs review
StatusFileSize
new3.24 KB

I was able to reproduce the problem and found a solution. The error was caused by an incorrect configuration of the "Streaming Media Views" submodule.

I have set the status of this problem to "Needs revision", if there are no particular problems in a week I will release the new version with the fix.

Thanks <3

arturopanetta’s picture

Assigned: ksandr » arturopanetta
sundays’s picture

Thank you Arturo.
However, I applied your patch, uninstalled "Streaming Media Views", re-installed it and got an error when trying to add media:

The website encountered an unexpected error. Please try again later.
TypeError: Argument 5 passed to Drupal\file\Plugin\Field\FieldWidget\FileWidget::__construct() must be of the type array, null given, called in /home/ppl/healthflix/web/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php on line 43 in Drupal\file\Plugin\Field\FieldWidget\FileWidget->__construct() (line 34 of core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php).

And this warning:
Notice: Undefined index: third_party_settings in Drupal\file\Plugin\Field\FieldWidget\FileWidget::create() (line 43 of core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php).

I did noticed that even after uninstalling "Streaming Media Views", the "Streaming video" option is still listed in the "Add media item" (/media/add). I don't know if it was already there with a clean Drupal or if I need to delete anything else for this patch to have impact.

Could you help? Thank you again.

arturopanetta’s picture

Hi sundays,
I did a test with a clean install of drupal, and everything went ok.
I have used: php 8.1, drupal 9.4.1, php_ffmpeg 0.18, drupal/php_ffmpeg:latest.
With a clean install it goes.

I don't know if it was already there with a clean Drupal or if I need to delete anything else for this patch to have impact.

The "Streaming video" type is added by the "Streaming media views" module. True, you can remove it before applying the patch, otherwise the configuration remains dirty:

  1. uninstall the "Streaming Media Views" module;
  2. remove "Streaming video" Media (Admin -> Structure -> Media Types -> Streaming Video -> delete);
  3. flush cache;
  4. install "Streaming media views" module.

I'll wait for news if it works for you.
Thank :)

sundays’s picture

I don't want to start with a clean install again but I found a way!
I just needed to go to admin/structure/media and delete the Streaming video type that was there, even after uninstalling the "Streaming media views" module.
After I re-installed, everything went fine and transcoding worked.
Thanks!

queenvictoria’s picture

Hey that's good news arturopanetta thank you. I'll also test it in the next few days.

Hey I wanted to contribute a patch but I haven't done that in the be gitlab flow. I don't seem to be able to fork the repository. Do you have any tips?

arturopanetta’s picture

I don't want to start with a clean install again but I found a way!
I just needed to go to admin/structure/media and delete the Streaming video type that was there, even after uninstalling the "Streaming media views" module.
After I re-installed, everything went fine and transcoding worked.
Thanks!

@sundays Glad it works without reinstalling.

Hey I wanted to contribute a patch but I haven't done that in the be gitlab flow. I don't seem to be able to fork the repository. Do you have any tips?

@queenvictoria Yes, the right way to fork an issue in gitlab is to use the green "Create issue fork" button at the top of the discussion.

queenvictoria’s picture

Status: Needs review » Reviewed & tested by the community

That works for me thanks @arturopanetta

rossio’s picture

Hello, I have the same problem, I am working localhost with xampp, on Windows 11.
Drupal Version 9.4.15, php 8.1.25, phpffmeg Version: 8.x-1.1, streaming Version: 1.2.0. I applied the patch previously uninstalling de module removing Streaming Video type. It still gives me the blank screen. The only thing that I am missing is the ffmpeg settings, I left the paths blank following the note:"Leave empty if the binary is located within system PATH." Please advise

arturopanetta’s picture

Status: Reviewed & tested by the community » Fixed

Fixed on 2.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.